Re-register UnifiedPush when application starts

This commit is contained in:
sim
2025-01-14 16:53:18 +01:00
parent cc4558458c
commit 7cd756f6b0

View File

@@ -6,6 +6,7 @@ import android.content.Context;
import android.webkit.WebView;
import org.joinmastodon.android.api.PushSubscriptionManager;
import org.joinmastodon.android.utils.UnifiedPushHelper;
import me.grishka.appkit.imageloader.ImageCache;
import me.grishka.appkit.utils.NetworkUtils;
@@ -27,7 +28,11 @@ public class MastodonApp extends Application{
ImageCache.setParams(params);
NetworkUtils.setUserAgent("MoshidonAndroid/"+BuildConfig.VERSION_NAME);
if (UnifiedPushHelper.isUnifiedPushEnabled(this)){
UnifiedPushHelper.registerAllAccounts(this);
} else {
PushSubscriptionManager.tryRegisterFCM();
}
GlobalUserPreferences.load();
if(BuildConfig.DEBUG){
WebView.setWebContentsDebuggingEnabled(true);