mirror of
https://github.com/gotify/android.git
synced 2026-06-08 23:17:06 +08:00
unregisterAck -> unregister
This commit is contained in:
@@ -29,11 +29,8 @@ fun sendEndpoint(context: Context, application: String, endpoint: String) {
|
||||
context.sendBroadcast(broadcastIntent)
|
||||
}
|
||||
|
||||
fun sendUnregistered(context: Context, application: String, needToken: Boolean){
|
||||
val token = getToken(context,application).let{
|
||||
if(it.isNullOrEmpty() and needToken) return else it
|
||||
}
|
||||
|
||||
fun sendUnregistered(context: Context, application: String, _token: String?){
|
||||
val token = _token?: getToken(context,application)!!
|
||||
val broadcastIntent = Intent()
|
||||
broadcastIntent.`package` = application
|
||||
broadcastIntent.action = UNREGISTERED
|
||||
|
||||
@@ -111,7 +111,7 @@ class RegisterBroadcastReceiver: BroadcastReceiver() {
|
||||
db.close()
|
||||
Log.i("RegisterService","Unregistration is finished")
|
||||
}
|
||||
sendUnregistered(context!!,application,false)
|
||||
sendUnregistered(context!!,application,token)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user