This commit is contained in:
nuclearfog 2023-06-01 20:15:07 +02:00
parent a128002298
commit 7d95cd1832
No known key found for this signature in database
GPG Key ID: 03488A185C476379
2 changed files with 12 additions and 3 deletions

View File

@ -30,6 +30,10 @@ android {
}
}
lintOptions {
ignore 'NotificationPermission'
}
packagingOptions {
jniLibs {
excludes += ['/META-INF/androidx.*', '/META-INF/kotlin*', '/META-INF/com.*', '/META-INF/services/**', '/META-INF/com/**', '/kotlin/**', '/Debug*']
@ -38,6 +42,8 @@ android {
excludes += ['/META-INF/CHANGES', '/META-INF/DEPENDENCIES', '/META-INF/README.md', '/META-INF/androidx.*', '/META-INF/kotlin*', '/META-INF/com.*', '/META-INF/services/**', '/META-INF/com/**', '/kotlin/**', '/Debug*']
}
}
}
dependencies {

View File

@ -11,6 +11,7 @@ import org.nuclearfog.twidda.backend.async.NotificationLoader.NotificationLoader
import org.nuclearfog.twidda.backend.async.PushUpdater;
import org.nuclearfog.twidda.backend.helper.update.PushUpdate;
import org.nuclearfog.twidda.config.GlobalSettings;
import org.unifiedpush.android.connector.ConstantsKt;
import org.unifiedpush.android.connector.MessagingReceiver;
/**
@ -37,9 +38,11 @@ public class PushNotificationReceiver extends MessagingReceiver implements Async
@Override
public void onNewEndpoint(@NonNull Context context, @NonNull String endpoint, @NonNull String instance) {
PushUpdater pushUpdater = new PushUpdater(context);
PushUpdate update = new PushUpdate(endpoint);
pushUpdater.execute(update, null);
if (instance.equals(ConstantsKt.INSTANCE_DEFAULT)) {
PushUpdater pushUpdater = new PushUpdater(context);
PushUpdate update = new PushUpdate(endpoint);
pushUpdater.execute(update, null);
}
}