Skip to content

Commit b8f841f

Browse files
committed
Cleanup
1 parent c3df11a commit b8f841f

3 files changed

Lines changed: 6 additions & 13 deletions

File tree

presentation/src/main/java/org/cryptomator/presentation/presenter/UnlockVaultPresenter.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,22 +161,22 @@ class UnlockVaultPresenter @Inject constructor(
161161
} else if (unverifiedVaultConfig.isPresent && unverifiedVaultConfig.get().keyLoadingStrategy() == KeyLoadingStrategy.HUB) {
162162
val unverifiedHubVaultConfig = unverifiedVaultConfig.get() as UnverifiedHubVaultConfig
163163
if (!isConsistentHubConfig(unverifiedHubVaultConfig)) {
164-
Timber.tag("VaultListPresenter").e("Inconsistent hub config detected. Denying access to protect the user.")
164+
Timber.tag("UnlockVaultPresenter").e("Inconsistent hub config detected. Denying access to protect the user.")
165165
Toast.makeText(context(), R.string.error_hub_not_trustworthy, Toast.LENGTH_LONG).show()
166166
finish()
167167
} else if (configContainsAllowedHosts(unverifiedHubVaultConfig) && !isHttpHost(unverifiedHubVaultConfig)) {
168168
allowedHubHosts(unverifiedHubVaultConfig, vault)
169169
} else if (isCryptomatorCloud(unverifiedHubVaultConfig) && !isHttpHost(unverifiedHubVaultConfig)) {
170170
allowedHubHosts(unverifiedHubVaultConfig, vault)
171171
} else if (isCryptomatorCloud(unverifiedHubVaultConfig) && isHttpHost(unverifiedHubVaultConfig)) {
172-
Timber.tag("VaultListPresenter").e("Cryptomator Cloud with http is not supported.")
172+
Timber.tag("UnlockVaultPresenter").e("Cryptomator Cloud with http is not supported.")
173173
Toast.makeText(context(), R.string.error_hub_not_trustworthy, Toast.LENGTH_LONG).show()
174174
finish()
175175
} else if (!isHttpHost(unverifiedHubVaultConfig)) {
176176
val hostnames = setOf(unverifiedHubVaultConfig.apiBaseUrl.authority, unverifiedHubVaultConfig.authEndpoint.authority).toTypedArray()
177177
view?.showDialog(HubCheckHostAuthenticityDialog.newInstance(hostnames, unverifiedHubVaultConfig, vault))
178178
} else {
179-
Timber.tag("VaultListPresenter").e("Cryptomator is not allowed to connect to " + unverifiedHubVaultConfig.apiBaseUrl.authority)
179+
Timber.tag("UnlockVaultPresenter").e("Cryptomator is not allowed to connect to " + unverifiedHubVaultConfig.apiBaseUrl.authority)
180180
Toast.makeText(context(), R.string.error_hub_not_trustworthy, Toast.LENGTH_LONG).show()
181181
finish()
182182
}
@@ -517,7 +517,7 @@ class UnlockVaultPresenter @Inject constructor(
517517
}
518518

519519
override fun onError(e: Throwable) {
520-
Timber.tag("VaultListPresenter").e(e, "Error while removing vault passwords")
520+
Timber.tag("UnlockVaultPresenter").e(e, "Error while removing vault passwords")
521521
finishWithResult(null)
522522
}
523523
})

presentation/src/main/res/values/strings.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@
251251
<string name="screen_settings_live_search_summary">Update search results while entering the query</string>
252252
<string name="screen_settings_glob_search">Search using glob pattern</string>
253253
<string name="screen_settings_glob_search_summary">Use glob pattern matching like alice.*.jpg</string>
254+
<string name="screen_hub_reset_unknown_hub_hosts_title">Reset Unknown Hub Hosts</string>
254255

255256
<string name="screen_settings_section_auto_lock">Automatic locking</string>
256257
<string name="screen_settings_auto_lock_timeout">Lock after</string>
@@ -334,10 +335,6 @@
334335
<string name="screen_cryptomator_variants_website_install" translatable="false">@string/screen_cryptomator_variants_lite_install</string>
335336
<string name="screen_cryptomator_variants_installation_hint">Switching from or to the main F-Droid repository variant requires a fresh setup of the app.</string>
336337

337-
<!-- ## screen: hub -->
338-
<string name="screen_hub_title" translatable="false">Hub</string>
339-
<string name="screen_hub_clear_unknown_hub_hosts_title">Clear Unknown Hub Hosts</string>
340-
341338
<!-- # dialogs -->
342339
<string name="dialog_button_cancel">Cancel</string>
343340

presentation/src/main/res/xml/preferences.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@
5050
android:summary="@string/screen_settings_cryptomator_variants_summary"
5151
android:title="@string/screen_settings_cryptomator_variants_label" />
5252

53-
</PreferenceCategory>
54-
55-
<PreferenceCategory android:title="@string/screen_hub_title">
56-
5753
<androidx.preference.PreferenceScreen
5854
android:key="clearTrustedHubHosts"
59-
android:title="@string/screen_hub_clear_unknown_hub_hosts_title" />
55+
android:title="@string/screen_hub_reset_unknown_hub_hosts_title" />
6056

6157
</PreferenceCategory>
6258

0 commit comments

Comments
 (0)