Commit d1a1eb68 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Explicitly finish when clicking the back arrow (default behavior re-instantiates MainActivity)

parent 6596cfaa
Pipeline #5095 passed with stage
in 1 minute and 53 seconds
......@@ -3,6 +3,7 @@ package com.frostnerd.smokescreen.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.MenuItem
import com.frostnerd.lifecyclemanagement.BaseActivity
import com.frostnerd.smokescreen.fragment.SettingsFragment
import com.frostnerd.smokescreen.getPreferences
......@@ -51,6 +52,13 @@ class SettingsActivity : BaseActivity() {
}).commit()
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return if(item.itemId == android.R.id.home) {
finish()
true
} else super.onOptionsItemSelected(item)
}
enum class Category {
GENERAL, NOTIFICATION, PIN, CACHE, LOGGING, IP, NETWORK, QUERIES
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment