Skip to content

Commit

Permalink
Error fixes
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <[email protected]>
  • Loading branch information
rapterjet2004 committed Oct 10, 2023
1 parent 7c0e4be commit 607641c
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,10 @@ class SettingsActivity : BaseActivity() {

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
binding.settingsIncognitoKeyboardSwitch.isChecked = appPreferences.isKeyboardIncognito
} else {
binding.settingsIncognitoKeyboardSwitch.visibility = View.GONE
}

binding.settingsIncognitoKeyboardSwitch.isChecked = appPreferences.isKeyboardIncognito

if (CapabilitiesUtilNew.isReadStatusAvailable(currentUser!!)) {
binding.settingsReadPrivacySwitch.isChecked = !CapabilitiesUtilNew.isReadStatusPrivate(currentUser!!)
} else {
Expand Down Expand Up @@ -939,7 +939,7 @@ class SettingsActivity : BaseActivity() {
private fun observeProxyType() {
CoroutineScope(Dispatchers.Main).launch {
proxyTypeFlow.collect { newString ->
if (("No proxy" == newString)) {
if (("No proxy" == newString) || newString.isEmpty()) {
hideProxySettings()
} else {
when (newString) {
Expand Down Expand Up @@ -1125,11 +1125,10 @@ class SettingsActivity : BaseActivity() {
}

override fun onNext(genericOverall: GenericOverall) {
Log.d("Julius", "read status set to $newBoolean")
// unused atm
}

override fun onError(e: Throwable) {
Log.d("Julius", "error in read privacy")
appPreferences.setReadPrivacy(!newBoolean)
binding.settingsReadPrivacySwitch.isChecked = !newBoolean
}
Expand Down

0 comments on commit 607641c

Please sign in to comment.