Optimization1
This commit is contained in:
parent
fed7779967
commit
abef87a632
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ public class AccountLiveAdapter extends RecyclerView.Adapter {
|
|||
} else {
|
||||
LiveNotificationDelayedService.totalAccount--;
|
||||
}
|
||||
Helper.startSreaming(context);
|
||||
Helper.startStreaming(context);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue