diff --git a/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepository.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepository.kt index 9f532d6a4..87d14d150 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepository.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepository.kt @@ -52,11 +52,6 @@ interface SettingsRepository { */ val isUnlockWithPinEnabled: Boolean - /** - * Clears all the settings data for the given user. - */ - fun clearData(userId: String) - /** * Sets default values for various settings for the given [userId] if necessary. This is * typically used when logging into a new account. diff --git a/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryImpl.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryImpl.kt index d9fffebcf..8456ca512 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryImpl.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryImpl.kt @@ -97,10 +97,6 @@ class SettingsRepositoryImpl( ?.let { authDiskSource.getEncryptedPin(userId = it) != null } ?: false - override fun clearData(userId: String) { - settingsDiskSource.clearData(userId = userId) - } - override fun setDefaultsIfNecessary(userId: String) { // Set Vault Settings defaults if (!isVaultTimeoutActionSet(userId = userId)) { diff --git a/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt b/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt index 5c0658aec..b0d346752 100644 --- a/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt @@ -92,7 +92,6 @@ class AuthRepositoryTest { environment = Environment.Us } private val settingsRepository: SettingsRepository = mockk() { - every { clearData(any()) } just runs every { setDefaultsIfNecessary(any()) } just runs } private val authSdkSource = mockk { diff --git a/app/src/test/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryTest.kt b/app/src/test/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryTest.kt index 058f29f68..e7250bde5 100644 --- a/app/src/test/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/data/platform/repository/SettingsRepositoryTest.kt @@ -34,27 +34,6 @@ class SettingsRepositoryTest { dispatcherManager = FakeDispatcherManager(), ) - @Test - fun `clearData should clear all necessary data for the given user`() { - val userId = "userId" - - fakeSettingsDiskSource.apply { - storeVaultTimeoutInMinutes( - userId = userId, - vaultTimeoutInMinutes = 30, - ) - storeVaultTimeoutAction( - userId = userId, - vaultTimeoutAction = VaultTimeoutAction.LOCK, - ) - } - - settingsRepository.clearData(userId = userId) - - assertNull(fakeSettingsDiskSource.getVaultTimeoutInMinutes(userId = userId)) - assertNull(fakeSettingsDiskSource.getVaultTimeoutAction(userId = userId)) - } - @Test fun `setDefaultsIfNecessary should set default values for the given user if necessary`() { val userId = "userId"