[F] Fix settings back button
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.hydev.wearsync
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
@@ -25,6 +26,16 @@ class ActivitySettings : AppCompatActivity()
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
finish()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
|
||||
class SettingsFragment : PreferenceFragmentCompat()
|
||||
{
|
||||
val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.*
|
||||
|
||||
internal class BluetoothHandler private constructor(context: Context) {
|
||||
private var currentTimeCounter = 0
|
||||
val batteryChannel = Channel<UInt>(UNLIMITED)
|
||||
val batteryChannel = Channel<BatteryMeasurement>(UNLIMITED)
|
||||
val heartRateChannel = Channel<HeartRateMeasurement>(UNLIMITED)
|
||||
val bloodPressureChannel = Channel<BloodPressureMeasurement>(UNLIMITED)
|
||||
val glucoseChannel = Channel<GlucoseMeasurement>(UNLIMITED)
|
||||
|
||||
Reference in New Issue
Block a user