move onOptionsItemSelected to BaseActivity (#2059)

* move onOptionsItemSelected to BaseActivity

* revert change in ComposeActivity
This commit is contained in:
Konrad Pozniak 2021-01-31 20:27:02 +01:00 committed by GitHub
commit 483beaa957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 13 additions and 195 deletions

View file

@ -18,7 +18,6 @@ package com.keylesspalace.tusky
import android.os.Bundle
import androidx.annotation.RawRes
import android.util.Log
import android.view.MenuItem
import android.widget.TextView
import com.keylesspalace.tusky.util.IOUtils
import kotlinx.android.extensions.CacheImplementation
@ -48,16 +47,6 @@ class LicenseActivity : BaseActivity() {
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> {
onBackPressed()
return true
}
}
return super.onOptionsItemSelected(item)
}
private fun loadFileIntoTextView(@RawRes fileId: Int, textView: TextView) {
val sb = StringBuilder()