Optimization1

This commit is contained in:
tom79 2019-10-27 15:16:40 +01:00
parent fed7779967
commit abef87a632
6 changed files with 8 additions and 8 deletions

View File

@ -754,7 +754,7 @@ public abstract class BaseMainActivity extends BaseActivity
}
if (social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA || social == UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED) {
Helper.startSreaming(BaseMainActivity.this);
Helper.startStreaming(BaseMainActivity.this);
}
if (hidde_menu != null)

View File

@ -73,7 +73,7 @@ public class MainApplication extends MultiDexApplication {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
ApplicationJob.cancelAllJob(NotificationsSyncJob.NOTIFICATION_REFRESH);
if( Helper.getNotificationIcon(getApplicationContext()) == Helper.NOTIF_NONE) {
if( Helper.liveNotifType(getApplicationContext()) == Helper.NOTIF_NONE) {
NotificationsSyncJob.schedule(false);
}

View File

@ -129,7 +129,7 @@ public class PostStatusAsyncTask extends AsyncTask<Void, Void, Void> {
if( account != null) {
String key = account.getUsername() + "@" + account.getInstance();
Helper.sleeps.put(key, 30000);
Helper.startSreaming(contextReference.get());
Helper.startStreaming(contextReference.get());
}
}

View File

@ -78,7 +78,7 @@ public class AccountLiveAdapter extends RecyclerView.Adapter {
} else {
LiveNotificationDelayedService.totalAccount--;
}
Helper.startSreaming(context);
Helper.startStreaming(context);
}
});
}

View File

@ -1247,7 +1247,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
if (isChecked) {
notification_settings.setVisibility(View.VISIBLE);
}
Helper.startSreaming(context);
Helper.startStreaming(context);
}
});
@ -1310,7 +1310,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
editor.apply();
break;
}
Helper.startSreaming(context);
Helper.startStreaming(context);
switch (Helper.liveNotifType(context)){
case Helper.NOTIF_LIVE:
set_live_type_indication.setText(R.string.live_notif_indication);
@ -1701,7 +1701,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
} else {
LiveNotificationDelayedService.totalAccount--;
}
Helper.startSreaming(context);
Helper.startStreaming(context);
}
});

View File

@ -4960,7 +4960,7 @@ public class Helper {
public static HashMap<String, Integer> sleeps = new HashMap<>();
public static void startSreaming(Context context) {
public static void startStreaming(Context context) {
int liveNotifications = Helper.liveNotifType(context);
switch (liveNotifications){
case Helper.NOTIF_LIVE: