diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt index db20e26a8..92d2a1fc2 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt @@ -835,14 +835,9 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp val position = mainPager.currentItem if (pagerAdapter.count == 0) return val fragment = pagerAdapter.instantiateItem(mainPager, position) as? IFloatingActionButtonFragment ?: return - fragment.onActionClick("home") - val tab = pagerAdapter.getTab(position) - when (tab.cls) { - MessagesEntriesFragment::class.java -> { - //TODO: open message creator - } - TrendsSuggestionsFragment::class.java -> openSearchView(null) - else -> startActivity(Intent(INTENT_ACTION_COMPOSE)) + val handled = fragment.onActionClick("home") ?: false + if (!handled) { + startActivity(Intent(INTENT_ACTION_COMPOSE)) } } diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/MessagesEntriesFragment.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/MessagesEntriesFragment.kt index 98416005e..7625f8360 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/MessagesEntriesFragment.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/MessagesEntriesFragment.kt @@ -1,6 +1,7 @@ package org.mariotaku.twidere.fragment import android.content.Context +import android.content.Intent import android.os.Bundle import android.support.v4.app.LoaderManager.LoaderCallbacks import android.support.v4.content.Loader @@ -10,6 +11,9 @@ import org.mariotaku.ktextension.toStringArray import org.mariotaku.sqliteqb.library.Expression import org.mariotaku.sqliteqb.library.OrderBy import org.mariotaku.twidere.R +import org.mariotaku.twidere.TwidereConstants.EXTRA_ACCOUNT_KEYS +import org.mariotaku.twidere.TwidereConstants.REQUEST_SELECT_ACCOUNT +import org.mariotaku.twidere.activity.AccountSelectorActivity import org.mariotaku.twidere.adapter.MessagesEntriesAdapter import org.mariotaku.twidere.adapter.MessagesEntriesAdapter.MessageConversationClickListener import org.mariotaku.twidere.adapter.iface.ILoadMoreSupportAdapter @@ -119,7 +123,9 @@ class MessagesEntriesFragment : AbsContentListRecyclerViewFragment