Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +0 −11 Original line number Diff line number Diff line Loading @@ -919,22 +919,11 @@ open class MessageList : goBack() } return true } else if (id == R.id.search_everywhere) { searchEverywhere() return true } return super.onOptionsItemSelected(item) } private fun searchEverywhere() { val searchIntent = Intent(this, Search::class.java).apply { action = Intent.ACTION_SEARCH putExtra(SearchManager.QUERY, intent.getStringExtra(SearchManager.QUERY)) } onNewIntent(searchIntent) } override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.message_list_option, menu) this.menu = menu Loading app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +17 −0 Original line number Diff line number Diff line package com.fsck.k9.fragment import android.app.Activity import android.app.SearchManager import android.content.Context import android.content.Intent import android.os.Bundle Loading Loading @@ -28,6 +29,7 @@ import com.fsck.k9.Clock import com.fsck.k9.K9 import com.fsck.k9.Preferences import com.fsck.k9.activity.FolderInfoHolder import com.fsck.k9.activity.Search import com.fsck.k9.activity.misc.ContactPicture import com.fsck.k9.controller.MessageReference import com.fsck.k9.controller.MessagingController Loading Loading @@ -764,12 +766,27 @@ class MessageListFragment : R.id.send_messages -> onSendPendingMessages() R.id.empty_trash -> onEmptyTrash() R.id.expunge -> onExpunge() R.id.search_everywhere -> onSearchEverywhere() else -> return super.onOptionsItemSelected(item) } return true } private fun onSearchEverywhere() { val searchQuery = requireActivity().intent.getStringExtra(SearchManager.QUERY) val searchIntent = Intent(requireContext(), Search::class.java).apply { action = Intent.ACTION_SEARCH putExtra(SearchManager.QUERY, searchQuery) addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) } startActivity(searchIntent) } private fun onSendPendingMessages() { messagingController.sendPendingMessages(account, null) } Loading Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +0 −11 Original line number Diff line number Diff line Loading @@ -919,22 +919,11 @@ open class MessageList : goBack() } return true } else if (id == R.id.search_everywhere) { searchEverywhere() return true } return super.onOptionsItemSelected(item) } private fun searchEverywhere() { val searchIntent = Intent(this, Search::class.java).apply { action = Intent.ACTION_SEARCH putExtra(SearchManager.QUERY, intent.getStringExtra(SearchManager.QUERY)) } onNewIntent(searchIntent) } override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.message_list_option, menu) this.menu = menu Loading
app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +17 −0 Original line number Diff line number Diff line package com.fsck.k9.fragment import android.app.Activity import android.app.SearchManager import android.content.Context import android.content.Intent import android.os.Bundle Loading Loading @@ -28,6 +29,7 @@ import com.fsck.k9.Clock import com.fsck.k9.K9 import com.fsck.k9.Preferences import com.fsck.k9.activity.FolderInfoHolder import com.fsck.k9.activity.Search import com.fsck.k9.activity.misc.ContactPicture import com.fsck.k9.controller.MessageReference import com.fsck.k9.controller.MessagingController Loading Loading @@ -764,12 +766,27 @@ class MessageListFragment : R.id.send_messages -> onSendPendingMessages() R.id.empty_trash -> onEmptyTrash() R.id.expunge -> onExpunge() R.id.search_everywhere -> onSearchEverywhere() else -> return super.onOptionsItemSelected(item) } return true } private fun onSearchEverywhere() { val searchQuery = requireActivity().intent.getStringExtra(SearchManager.QUERY) val searchIntent = Intent(requireContext(), Search::class.java).apply { action = Intent.ACTION_SEARCH putExtra(SearchManager.QUERY, searchQuery) addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) } startActivity(searchIntent) } private fun onSendPendingMessages() { messagingController.sendPendingMessages(account, null) } Loading