added a Mensa shortcut
* added a Mensa shortcut, to directly display the Mensa-Screen * kotlin 1.3.60 -> 1.3.61
This commit is contained in:
@ -85,9 +85,17 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||
|
||||
nav_view.setNavigationItemSelectedListener(this)
|
||||
|
||||
// TODO use a switch expression
|
||||
// if we get an NFC read intent while the app is closed call readBalance
|
||||
if (NfcAdapter.ACTION_TECH_DISCOVERED == intent.action)
|
||||
NFCMensaCard.readBalance(intent, this)
|
||||
if ("org.mosad.seil0.projectlaogai.fragments.MensaFragment" == intent.action) {
|
||||
println("starting mensa screen")
|
||||
// TODO find a way to use only one FragmentTransaction
|
||||
val fragmentTransaction2: FragmentTransaction = supportFragmentManager.beginTransaction()
|
||||
fragmentTransaction2.replace(R.id.fragment_container, MensaFragment())
|
||||
fragmentTransaction2.commit()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
|
Reference in New Issue
Block a user