diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a4b29cf22..80b76b845 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -34,9 +34,6 @@ android:resource="@xml/share_shortcuts" /> - diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt b/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt index 5333d764b..aea0211a2 100644 --- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt @@ -44,7 +44,6 @@ import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.request.target.CustomTarget import com.bumptech.glide.request.target.FixedSizeDrawable import com.bumptech.glide.request.transition.Transition -import com.google.android.material.floatingactionbutton.FloatingActionButton import com.google.android.material.tabs.TabLayout import com.google.android.material.tabs.TabLayout.OnTabSelectedListener import com.google.android.material.tabs.TabLayoutMediator @@ -61,7 +60,6 @@ import com.keylesspalace.tusky.components.scheduled.ScheduledTootActivity import com.keylesspalace.tusky.components.search.SearchActivity import com.keylesspalace.tusky.databinding.ActivityMainBinding import com.keylesspalace.tusky.db.AccountEntity -import com.keylesspalace.tusky.db.AppDatabase import com.keylesspalace.tusky.entity.Account import com.keylesspalace.tusky.fragment.SFragment import com.keylesspalace.tusky.interfaces.AccountSelectionListener @@ -101,9 +99,6 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje @Inject lateinit var conversationRepository: ConversationsRepository - @Inject - lateinit var appDb: AppDatabase - @Inject lateinit var draftHelper: DraftHelper @@ -134,10 +129,8 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje super.onCreate(savedInstanceState) val activeAccount = accountManager.activeAccount - if (activeAccount == null) { - // will be redirected to LoginActivity by BaseActivity - return - } + ?: return // will be redirected to LoginActivity by BaseActivity + var showNotificationTab = false if (intent != null) { /** there are two possibilities the accountId can be passed to MainActivity: @@ -753,7 +746,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje header.setActiveProfile(accountManager.activeAccount!!.id) } - override fun getActionButton(): FloatingActionButton? = binding.composeButton + override fun getActionButton() = binding.composeButton override fun androidInjector() = androidInjector