mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-03-18 12:30:08 +01:00
Removed overriding Back press
This commit is contained in:
parent
40b168cbeb
commit
cd7e29c518
@ -82,10 +82,6 @@ class MainActivity : SimpleActivity() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
if (intent.getBooleanExtra(EXIT, false)) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
if (storedTextColor != config.textColor) {
|
||||
(conversations_list.adapter as? ConversationsAdapter)?.updateTextColor(config.textColor)
|
||||
}
|
||||
|
@ -172,18 +172,6 @@ class ThreadActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (intent.getBooleanExtra(FROM_NOTIFICATION, false)) {
|
||||
val intent = Intent(this@ThreadActivity, MainActivity::class.java).apply {
|
||||
flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
putExtra(EXIT, true)
|
||||
}
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
super.onBackPressed()
|
||||
}
|
||||
|
||||
private fun onHomePressed() {
|
||||
val intent = Intent(this, MainActivity::class.java)
|
||||
startActivity(intent)
|
||||
|
@ -711,7 +711,6 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
|
||||
|
||||
val intent = Intent(this, ThreadActivity::class.java).apply {
|
||||
putExtra(THREAD_ID, threadId)
|
||||
putExtra(FROM_NOTIFICATION, true)
|
||||
}
|
||||
|
||||
val pendingIntent = PendingIntent.getActivity(this, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
|
@ -26,9 +26,6 @@ const val EXPORT_FILE_EXT = ".json"
|
||||
const val IMPORT_SMS = "import_sms"
|
||||
const val IMPORT_MMS = "import_mms"
|
||||
|
||||
const val EXIT = "EXIT"
|
||||
const val FROM_NOTIFICATION = "FROM_NOTIFICATION"
|
||||
|
||||
private const val PATH = "com.simplemobiletools.smsmessenger.action."
|
||||
const val MARK_AS_READ = PATH + "mark_as_read"
|
||||
const val REPLY = PATH + "reply"
|
||||
|
Loading…
x
Reference in New Issue
Block a user