Fixed new fragment not clearing menu in toolbar

This commit is contained in:
Viktor De Pasquale 2019-04-16 19:26:53 +02:00
parent 0568ae5391
commit 79f2d08c81

View File

@ -1,5 +1,7 @@
package com.topjohnwu.magisk.ui.home package com.topjohnwu.magisk.ui.home
import android.os.Bundle
import android.view.View
import com.skoumal.teanity.viewevents.ViewEvent import com.skoumal.teanity.viewevents.ViewEvent
import com.topjohnwu.magisk.BuildConfig import com.topjohnwu.magisk.BuildConfig
import com.topjohnwu.magisk.Config import com.topjohnwu.magisk.Config
@ -39,6 +41,11 @@ class MagiskFragment : NewMagiskFragment<HomeViewModel, FragmentMagiskBinding>()
} }
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setHasOptionsMenu(true)
}
private fun installMagisk() { private fun installMagisk() {
// Show Manager update first // Show Manager update first
if (Config.remoteManagerVersionCode > BuildConfig.VERSION_CODE) { if (Config.remoteManagerVersionCode > BuildConfig.VERSION_CODE) {