Skip to content

Commit a57bb3e

Browse files
Fixed answer at any angle getting unset after reopening the app
1 parent 6fe16b2 commit a57bb3e

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
applicationId "me.hackerchick.raisetoanswer"
1010
minSdkVersion 26
1111
targetSdkVersion 30
12-
versionCode 31
13-
versionName "3.6.4"
12+
versionCode 32
13+
versionName "3.6.5"
1414

1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
}

app/src/main/java/me/hackerchick/raisetoanswer/MainActivity.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ class MainActivity : AppCompatActivity() {
155155
val beepBehaviour: SwitchCompat = binding.behaviourBeep
156156
val vibrateBehaviour: SwitchCompat = binding.behaviourVibrate
157157

158+
setAnswerFeature(Util.answerFeatureEnabled(applicationContext), false)
159+
setAnswerAllAnglesFeatureIfSupported(Util.answerAllAnglesFeatureEnabled(applicationContext))
160+
setDeclineFeatureIfSupported(Util.declineFeatureEnabled(applicationContext))
161+
162+
setBeepBehaviour(Util.beepBehaviourEnabled(applicationContext))
163+
setVibrateBehaviour(Util.vibrateBehaviourEnabled(applicationContext))
164+
158165
answerFeature.setOnCheckedChangeListener { _, isChecked ->
159166
setAnswerFeature(isChecked, true)
160167
}
@@ -175,13 +182,6 @@ class MainActivity : AppCompatActivity() {
175182
setVibrateBehaviour(isChecked)
176183
}
177184

178-
setAnswerFeature(Util.answerFeatureEnabled(applicationContext), false)
179-
setAnswerAllAnglesFeatureIfSupported(Util.answerAllAnglesFeatureEnabled(applicationContext))
180-
setDeclineFeatureIfSupported(Util.declineFeatureEnabled(applicationContext))
181-
182-
setBeepBehaviour(Util.beepBehaviourEnabled(applicationContext))
183-
setVibrateBehaviour(Util.vibrateBehaviourEnabled(applicationContext))
184-
185185
// Debugging
186186
val debugLog: TextView = binding.debugLog
187187
debugLog.setOnClickListener {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed answer at any angle getting unset after reopening the app

0 commit comments

Comments
 (0)