mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
move createMainActivityIntent near getIntentToOpenConversation
TODO: unify? Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
8b1a809464
commit
328a747d79
@ -186,17 +186,6 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createMainActivityIntent(): Intent {
|
|
||||||
val intent = Intent(context, MainActivity::class.java)
|
|
||||||
intent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_NEW_TASK
|
|
||||||
val bundle = Bundle()
|
|
||||||
bundle.putString(KEY_ROOM_TOKEN, pushMessage.id)
|
|
||||||
bundle.putParcelable(KEY_USER_ENTITY, signatureVerification.user)
|
|
||||||
bundle.putBoolean(KEY_FROM_NOTIFICATION_START_CALL, false)
|
|
||||||
intent.putExtras(bundle)
|
|
||||||
return intent
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun handleCallPushMessage() {
|
private fun handleCallPushMessage() {
|
||||||
val fullScreenIntent = Intent(context, CallNotificationActivity::class.java)
|
val fullScreenIntent = Intent(context, CallNotificationActivity::class.java)
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
@ -871,16 +860,23 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private fun createMainActivityIntent(): Intent {
|
||||||
private fun getIntentToOpenConversation(): PendingIntent? {
|
|
||||||
val bundle = Bundle()
|
|
||||||
val intent = Intent(context, MainActivity::class.java)
|
val intent = Intent(context, MainActivity::class.java)
|
||||||
intent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_NEW_TASK
|
intent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
|
val bundle = Bundle()
|
||||||
|
bundle.putString(KEY_ROOM_TOKEN, pushMessage.id)
|
||||||
|
bundle.putParcelable(KEY_USER_ENTITY, signatureVerification.user)
|
||||||
|
bundle.putBoolean(KEY_FROM_NOTIFICATION_START_CALL, false)
|
||||||
|
intent.putExtras(bundle)
|
||||||
|
return intent
|
||||||
|
}
|
||||||
|
private fun getIntentToOpenConversation(): PendingIntent? {
|
||||||
|
val intent = Intent(context, MainActivity::class.java)
|
||||||
|
intent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
|
val bundle = Bundle()
|
||||||
bundle.putString(KEY_ROOM_TOKEN, pushMessage.id)
|
bundle.putString(KEY_ROOM_TOKEN, pushMessage.id)
|
||||||
bundle.putParcelable(KEY_USER_ENTITY, signatureVerification.user)
|
bundle.putParcelable(KEY_USER_ENTITY, signatureVerification.user)
|
||||||
bundle.putBoolean(KEY_FROM_NOTIFICATION_START_CALL, false)
|
bundle.putBoolean(KEY_FROM_NOTIFICATION_START_CALL, false)
|
||||||
|
|
||||||
intent.putExtras(bundle)
|
intent.putExtras(bundle)
|
||||||
|
|
||||||
val requestCode = System.currentTimeMillis().toInt()
|
val requestCode = System.currentTimeMillis().toInt()
|
||||||
|
Loading…
Reference in New Issue
Block a user