Fix issue #342
This commit is contained in:
parent
95e83305e4
commit
9885aa2235
|
@ -824,6 +824,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
.addTag(Helper.WORKER_SCHEDULED_STATUSES)
|
||||
.setInitialDelay(delayToPass, TimeUnit.MILLISECONDS)
|
||||
.build();
|
||||
WorkManager.getInstance(ComposeActivity.this).enqueue(oneTimeWorkRequest);
|
||||
statusDraft.workerUuid = oneTimeWorkRequest.getId();
|
||||
statusDraft.scheduled_at = date;
|
||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
|
|
|
@ -37,6 +37,7 @@ import androidx.preference.PreferenceManager;
|
|||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.work.Data;
|
||||
import androidx.work.OneTimeWorkRequest;
|
||||
import androidx.work.WorkManager;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
@ -389,6 +390,7 @@ public class MastodonHelper {
|
|||
.setInputData(inputData)
|
||||
.setInitialDelay(delayToPass, TimeUnit.MILLISECONDS)
|
||||
.build();
|
||||
WorkManager.getInstance(context).enqueue(oneTimeWorkRequest);
|
||||
ScheduledBoost scheduledBoost = new ScheduledBoost();
|
||||
scheduledBoost.userId = BaseMainActivity.currentUserID;
|
||||
scheduledBoost.statusId = status.reblog != null ? status.reblog.id : status.id;
|
||||
|
|
|
@ -110,9 +110,10 @@ public class PushHelper {
|
|||
}).start();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
String value = prefs.getString(context.getString(R.string.SET_NOTIFICATION_DELAY_VALUE), "15");
|
||||
new PeriodicWorkRequest.Builder(NotificationsWorker.class, Long.parseLong(value), TimeUnit.MINUTES)
|
||||
PeriodicWorkRequest notificationPeriodic = new PeriodicWorkRequest.Builder(NotificationsWorker.class, Long.parseLong(value), TimeUnit.MINUTES)
|
||||
.addTag(Helper.WORKER_REFRESH_NOTIFICATION)
|
||||
.build();
|
||||
WorkManager.getInstance(context).enqueue(notificationPeriodic);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue