Loading app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp:4.9.3' // Firebase, sigh ... (only Google Play) playImplementation 'com.google.firebase:firebase-messaging:23.0.2' playImplementation 'com.google.firebase:firebase-messaging:23.0.3' // RecyclerView implementation "androidx.recyclerview:recyclerview:1.3.0-alpha02" Loading app/src/main/java/io/heckel/ntfy/db/Database.kt +7 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ abstract class Database : RoomDatabase() { .addMigrations(MIGRATION_6_7) .addMigrations(MIGRATION_7_8) .addMigrations(MIGRATION_8_9) .addMigrations(MIGRATION_9_10) .fallbackToDestructiveMigration() .build() this.instance = instance Loading Loading @@ -237,6 +238,12 @@ abstract class Database : RoomDatabase() { db.execSQL("ALTER TABLE Notification ADD COLUMN encoding TEXT NOT NULL DEFAULT('')") } } private val MIGRATION_9_10 = object : Migration(9, 10) { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE Notification ADD COLUMN actions TEXT NOT NULL DEFAULT('')") } } } } Loading app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt +7 −4 Original line number Diff line number Diff line package io.heckel.ntfy.msg import android.app.* import android.content.* import android.app.NotificationChannel import android.app.NotificationManager import android.app.PendingIntent import android.app.TaskStackBuilder import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.graphics.BitmapFactory import android.media.RingtoneManager import android.net.Uri Loading @@ -10,8 +15,6 @@ import androidx.core.app.NotificationCompat import androidx.core.content.ContextCompat import io.heckel.ntfy.R import io.heckel.ntfy.db.* import io.heckel.ntfy.db.Notification import io.heckel.ntfy.util.Log import io.heckel.ntfy.ui.Colors import io.heckel.ntfy.ui.DetailActivity import io.heckel.ntfy.ui.MainActivity Loading app/src/main/java/io/heckel/ntfy/msg/UserActionWorker.kt +0 −4 Original line number Diff line number Diff line package io.heckel.ntfy.msg import android.content.Context import android.content.Intent import android.net.Uri import androidx.work.Worker import androidx.work.WorkerParameters import io.heckel.ntfy.R Loading @@ -10,7 +8,6 @@ import io.heckel.ntfy.app.Application import io.heckel.ntfy.db.* import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_BROADCAST import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_HTTP import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_VIEW import io.heckel.ntfy.util.Log import okhttp3.OkHttpClient import okhttp3.Request Loading Loading @@ -64,7 +61,6 @@ class UserActionWorker(private val context: Context, params: WorkerParameters) : private fun performBroadcastAction(action: Action) { broadcaster.sendUserAction(action) save(action.copy(progress = ACTION_PROGRESS_SUCCESS, error = null)) } private fun performHttpAction(action: Action) { Loading Loading
app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp:4.9.3' // Firebase, sigh ... (only Google Play) playImplementation 'com.google.firebase:firebase-messaging:23.0.2' playImplementation 'com.google.firebase:firebase-messaging:23.0.3' // RecyclerView implementation "androidx.recyclerview:recyclerview:1.3.0-alpha02" Loading
app/src/main/java/io/heckel/ntfy/db/Database.kt +7 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ abstract class Database : RoomDatabase() { .addMigrations(MIGRATION_6_7) .addMigrations(MIGRATION_7_8) .addMigrations(MIGRATION_8_9) .addMigrations(MIGRATION_9_10) .fallbackToDestructiveMigration() .build() this.instance = instance Loading Loading @@ -237,6 +238,12 @@ abstract class Database : RoomDatabase() { db.execSQL("ALTER TABLE Notification ADD COLUMN encoding TEXT NOT NULL DEFAULT('')") } } private val MIGRATION_9_10 = object : Migration(9, 10) { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE Notification ADD COLUMN actions TEXT NOT NULL DEFAULT('')") } } } } Loading
app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt +7 −4 Original line number Diff line number Diff line package io.heckel.ntfy.msg import android.app.* import android.content.* import android.app.NotificationChannel import android.app.NotificationManager import android.app.PendingIntent import android.app.TaskStackBuilder import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.graphics.BitmapFactory import android.media.RingtoneManager import android.net.Uri Loading @@ -10,8 +15,6 @@ import androidx.core.app.NotificationCompat import androidx.core.content.ContextCompat import io.heckel.ntfy.R import io.heckel.ntfy.db.* import io.heckel.ntfy.db.Notification import io.heckel.ntfy.util.Log import io.heckel.ntfy.ui.Colors import io.heckel.ntfy.ui.DetailActivity import io.heckel.ntfy.ui.MainActivity Loading
app/src/main/java/io/heckel/ntfy/msg/UserActionWorker.kt +0 −4 Original line number Diff line number Diff line package io.heckel.ntfy.msg import android.content.Context import android.content.Intent import android.net.Uri import androidx.work.Worker import androidx.work.WorkerParameters import io.heckel.ntfy.R Loading @@ -10,7 +8,6 @@ import io.heckel.ntfy.app.Application import io.heckel.ntfy.db.* import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_BROADCAST import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_HTTP import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_VIEW import io.heckel.ntfy.util.Log import okhttp3.OkHttpClient import okhttp3.Request Loading Loading @@ -64,7 +61,6 @@ class UserActionWorker(private val context: Context, params: WorkerParameters) : private fun performBroadcastAction(action: Action) { broadcaster.sendUserAction(action) save(action.copy(progress = ACTION_PROGRESS_SUCCESS, error = null)) } private fun performHttpAction(action: Action) { Loading