fix timers
This commit is contained in:
parent
433d3ea0f4
commit
28ad45e5a6
|
@ -70,6 +70,7 @@ import java.util.TimerTask;
|
||||||
|
|
||||||
import app.fedilab.android.R;
|
import app.fedilab.android.R;
|
||||||
import app.fedilab.android.activities.AccountReportActivity;
|
import app.fedilab.android.activities.AccountReportActivity;
|
||||||
|
import app.fedilab.android.activities.BaseActivity;
|
||||||
import app.fedilab.android.activities.BaseMainActivity;
|
import app.fedilab.android.activities.BaseMainActivity;
|
||||||
import app.fedilab.android.activities.CustomSharingActivity;
|
import app.fedilab.android.activities.CustomSharingActivity;
|
||||||
import app.fedilab.android.activities.MainActivity;
|
import app.fedilab.android.activities.MainActivity;
|
||||||
|
@ -1481,10 +1482,10 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||||
boolean disableAnimatedEmoji = sharedpreferences.getBoolean(Helper.SET_DISABLE_ANIMATED_EMOJI, false);
|
boolean disableAnimatedEmoji = sharedpreferences.getBoolean(Helper.SET_DISABLE_ANIMATED_EMOJI, false);
|
||||||
if (!disableAnimatedEmoji) {
|
if (!disableAnimatedEmoji) {
|
||||||
if (BaseMainActivity.timer == null) {
|
if (BaseActivity.timer == null) {
|
||||||
BaseMainActivity.timer = new Timer();
|
BaseActivity.timer = new Timer();
|
||||||
}
|
}
|
||||||
BaseMainActivity.timer.schedule(new TimerTask() {
|
BaseActivity.timer.schedule(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
mHandler.post(updateAnimatedEmoji);
|
mHandler.post(updateAnimatedEmoji);
|
||||||
|
|
|
@ -117,6 +117,7 @@ import java.util.regex.Pattern;
|
||||||
|
|
||||||
import app.fedilab.android.R;
|
import app.fedilab.android.R;
|
||||||
import app.fedilab.android.activities.AccountReportActivity;
|
import app.fedilab.android.activities.AccountReportActivity;
|
||||||
|
import app.fedilab.android.activities.BaseActivity;
|
||||||
import app.fedilab.android.activities.BaseMainActivity;
|
import app.fedilab.android.activities.BaseMainActivity;
|
||||||
import app.fedilab.android.activities.CustomSharingActivity;
|
import app.fedilab.android.activities.CustomSharingActivity;
|
||||||
import app.fedilab.android.activities.MainActivity;
|
import app.fedilab.android.activities.MainActivity;
|
||||||
|
@ -4516,10 +4517,10 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||||
boolean disableAnimatedEmoji = sharedpreferences.getBoolean(Helper.SET_DISABLE_ANIMATED_EMOJI, false);
|
boolean disableAnimatedEmoji = sharedpreferences.getBoolean(Helper.SET_DISABLE_ANIMATED_EMOJI, false);
|
||||||
if (!disableAnimatedEmoji) {
|
if (!disableAnimatedEmoji) {
|
||||||
if (BaseMainActivity.timer == null) {
|
if (BaseActivity.timer == null) {
|
||||||
BaseMainActivity.timer = new Timer();
|
BaseActivity.timer = new Timer();
|
||||||
}
|
}
|
||||||
BaseMainActivity.timer.schedule(new TimerTask() {
|
BaseActivity.timer.schedule(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
mHandler.post(updateAnimatedEmoji);
|
mHandler.post(updateAnimatedEmoji);
|
||||||
|
|
Loading…
Reference in New Issue