Remove badge + avoid webview to be launched
This commit is contained in:
parent
621536818e
commit
6f3abaaccc
|
@ -122,7 +122,6 @@ dependencies {
|
|||
implementation 'com.github.penfeizhou.android.animation:apng:1.1.0'
|
||||
implementation 'com.github.penfeizhou.android.animation:gif:1.1.0'
|
||||
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
|
||||
implementation "me.leolin:ShortcutBadger:1.1.22@aar"
|
||||
implementation 'com.github.smarteist:autoimageslider:1.3.2'
|
||||
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-2'
|
||||
|
||||
|
|
|
@ -143,7 +143,6 @@ import app.fedilab.android.interfaces.OnRetrieveMetaDataInterface;
|
|||
import app.fedilab.android.interfaces.OnRetrieveRemoteAccountInterface;
|
||||
import app.fedilab.android.interfaces.OnSyncTimelineInterface;
|
||||
import app.fedilab.android.interfaces.OnUpdateAccountInfoInterface;
|
||||
import me.leolin.shortcutbadger.ShortcutBadger;
|
||||
|
||||
import static app.fedilab.android.asynctasks.ManageFiltersAsyncTask.action.GET_ALL_FILTER;
|
||||
import static app.fedilab.android.helper.Helper.changeDrawableColor;
|
||||
|
@ -1722,9 +1721,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
public void onResume() {
|
||||
super.onResume();
|
||||
PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean("isMainActivityRunning", true).apply();
|
||||
|
||||
LiveNotificationService.liveNotifBadge = 0;
|
||||
ShortcutBadger.removeCount(getApplicationContext());
|
||||
|
||||
//Proceeds to update of the authenticated account
|
||||
/*if (Helper.isLoggedIn(getApplicationContext())) {
|
||||
new UpdateAccountInfoByIDAsyncTask(getApplicationContext(), social, BaseMainActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
|
|
|
@ -283,6 +283,7 @@ public class LoginActivity extends BaseActivity {
|
|||
client_id_for_webview = true;
|
||||
retrievesClientId();
|
||||
} else {
|
||||
client_id_for_webview = false;
|
||||
if (instanceNodeInfo.getName().equals("PEERTUBE")) {
|
||||
step_login_credential.setVisibility(View.VISIBLE);
|
||||
step_instance.setVisibility(View.GONE);
|
||||
|
|
|
@ -14,7 +14,6 @@ package app.fedilab.android.services;
|
|||
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
* see <http://www.gnu.org/licenses>. */
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
|
@ -294,6 +293,7 @@ public class LiveNotificationDelayedService extends Service {
|
|||
boolean notif_share = sharedpreferences.getBoolean(Helper.SET_NOTIF_SHARE, true);
|
||||
boolean notif_poll = sharedpreferences.getBoolean(Helper.SET_NOTIF_POLL, true);
|
||||
boolean somethingToPush = (notif_follow || notif_add || notif_mention || notif_share || notif_poll);
|
||||
|
||||
String message = null;
|
||||
if (somethingToPush) {
|
||||
switch (notification.getType()) {
|
||||
|
@ -368,6 +368,7 @@ public class LiveNotificationDelayedService extends Service {
|
|||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
//Some others notification
|
||||
final Intent intent = new Intent(getApplicationContext(), MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
|
|
@ -14,7 +14,6 @@ package app.fedilab.android.services;
|
|||
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
* see <http://www.gnu.org/licenses>. */
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
|
@ -32,7 +31,6 @@ import android.os.Bundle;
|
|||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
|
@ -69,7 +67,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import app.fedilab.android.activities.BaseMainActivity;
|
||||
import app.fedilab.android.client.API;
|
||||
import app.fedilab.android.client.Entities.Account;
|
||||
import app.fedilab.android.client.Entities.Notification;
|
||||
|
@ -79,7 +76,6 @@ import app.fedilab.android.sqlite.AccountDAO;
|
|||
import app.fedilab.android.sqlite.Sqlite;
|
||||
import app.fedilab.android.R;
|
||||
import app.fedilab.android.activities.MainActivity;
|
||||
import me.leolin.shortcutbadger.ShortcutBadger;
|
||||
|
||||
import static androidx.core.text.HtmlCompat.FROM_HTML_MODE_LEGACY;
|
||||
import static app.fedilab.android.helper.Helper.getMainLogo;
|
||||
|
@ -106,7 +102,6 @@ public class LiveNotificationService extends Service implements NetworkStateRece
|
|||
private NotificationChannel channel;
|
||||
public static int totalAccount = 0;
|
||||
public static int eventsCount = 0;
|
||||
public static int liveNotifBadge = 0;
|
||||
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
@ -426,8 +421,6 @@ public class LiveNotificationService extends Service implements NetworkStateRece
|
|||
final String finalMessage = message;
|
||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
Helper.NotifType finalNotifType = notifType;
|
||||
liveNotifBadge++;
|
||||
ShortcutBadger.applyCount(getApplicationContext(), liveNotifBadge);
|
||||
Runnable myRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
Loading…
Reference in New Issue