Bump FB, cleanup
This commit is contained in:
parent
08dc7da5e5
commit
31bdc2bc81
4 changed files with 15 additions and 9 deletions
|
@ -81,7 +81,7 @@ dependencies {
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||||
|
|
||||||
// Firebase, sigh ... (only Google Play)
|
// Firebase, sigh ... (only Google Play)
|
||||||
playImplementation 'com.google.firebase:firebase-messaging:23.0.2'
|
playImplementation 'com.google.firebase:firebase-messaging:23.0.3'
|
||||||
|
|
||||||
// RecyclerView
|
// RecyclerView
|
||||||
implementation "androidx.recyclerview:recyclerview:1.3.0-alpha02"
|
implementation "androidx.recyclerview:recyclerview:1.3.0-alpha02"
|
||||||
|
|
|
@ -162,6 +162,7 @@ abstract class Database : RoomDatabase() {
|
||||||
.addMigrations(MIGRATION_6_7)
|
.addMigrations(MIGRATION_6_7)
|
||||||
.addMigrations(MIGRATION_7_8)
|
.addMigrations(MIGRATION_7_8)
|
||||||
.addMigrations(MIGRATION_8_9)
|
.addMigrations(MIGRATION_8_9)
|
||||||
|
.addMigrations(MIGRATION_9_10)
|
||||||
.fallbackToDestructiveMigration()
|
.fallbackToDestructiveMigration()
|
||||||
.build()
|
.build()
|
||||||
this.instance = instance
|
this.instance = instance
|
||||||
|
@ -237,6 +238,12 @@ abstract class Database : RoomDatabase() {
|
||||||
db.execSQL("ALTER TABLE Notification ADD COLUMN encoding TEXT NOT NULL DEFAULT('')")
|
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('')")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
package io.heckel.ntfy.msg
|
package io.heckel.ntfy.msg
|
||||||
|
|
||||||
import android.app.*
|
import android.app.NotificationChannel
|
||||||
import android.content.*
|
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.graphics.BitmapFactory
|
||||||
import android.media.RingtoneManager
|
import android.media.RingtoneManager
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
@ -10,8 +15,6 @@ import androidx.core.app.NotificationCompat
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import io.heckel.ntfy.R
|
import io.heckel.ntfy.R
|
||||||
import io.heckel.ntfy.db.*
|
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.Colors
|
||||||
import io.heckel.ntfy.ui.DetailActivity
|
import io.heckel.ntfy.ui.DetailActivity
|
||||||
import io.heckel.ntfy.ui.MainActivity
|
import io.heckel.ntfy.ui.MainActivity
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package io.heckel.ntfy.msg
|
package io.heckel.ntfy.msg
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
|
||||||
import android.net.Uri
|
|
||||||
import androidx.work.Worker
|
import androidx.work.Worker
|
||||||
import androidx.work.WorkerParameters
|
import androidx.work.WorkerParameters
|
||||||
import io.heckel.ntfy.R
|
import io.heckel.ntfy.R
|
||||||
|
@ -10,7 +8,6 @@ import io.heckel.ntfy.app.Application
|
||||||
import io.heckel.ntfy.db.*
|
import io.heckel.ntfy.db.*
|
||||||
import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_BROADCAST
|
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_HTTP
|
||||||
import io.heckel.ntfy.msg.NotificationService.Companion.ACTION_VIEW
|
|
||||||
import io.heckel.ntfy.util.Log
|
import io.heckel.ntfy.util.Log
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -64,7 +61,6 @@ class UserActionWorker(private val context: Context, params: WorkerParameters) :
|
||||||
|
|
||||||
private fun performBroadcastAction(action: Action) {
|
private fun performBroadcastAction(action: Action) {
|
||||||
broadcaster.sendUserAction(action)
|
broadcaster.sendUserAction(action)
|
||||||
save(action.copy(progress = ACTION_PROGRESS_SUCCESS, error = null))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun performHttpAction(action: Action) {
|
private fun performHttpAction(action: Action) {
|
||||||
|
|
Loading…
Reference in a new issue