fix(unified-push-connector): remove try catches that are no longer needed

This commit is contained in:
LucasGGamerM 2025-03-13 08:26:31 -03:00
parent bc43e2180f
commit 058fb62253

View file

@ -29,29 +29,21 @@ public class UnifiedPushHelper {
public static void registerAllAccounts(@NonNull Context context) { public static void registerAllAccounts(@NonNull Context context) {
for (AccountSession accountSession : AccountSessionManager.getInstance().getLoggedInAccounts()){ for (AccountSession accountSession : AccountSessionManager.getInstance().getLoggedInAccounts()){
try {
UnifiedPush.register( UnifiedPush.register(
context, context,
accountSession.getID(), accountSession.getID(),
null, null,
accountSession.app.vapidKey.replaceAll("=","") accountSession.app.vapidKey.replaceAll("=","")
); );
} catch (Exception e) {
e.printStackTrace();
}
} }
} }
public static void unregisterAllAccounts(@NonNull Context context) { public static void unregisterAllAccounts(@NonNull Context context) {
for (AccountSession accountSession : AccountSessionManager.getInstance().getLoggedInAccounts()){ for (AccountSession accountSession : AccountSessionManager.getInstance().getLoggedInAccounts()){
try {
UnifiedPush.unregister( UnifiedPush.unregister(
context, context,
accountSession.getID() accountSession.getID()
); );
} catch (Exception e) {
e.printStackTrace();
}
// use FCM again // use FCM again
accountSession.getPushSubscriptionManager().registerAccountForPush(null); accountSession.getPushSubscriptionManager().registerAccountForPush(null);
} }