Skip to content

Commit

Permalink
[FIX/#3] clearLocalPref 로직 보완
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed Apr 21, 2023
1 parent 27573b4 commit 68876d8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LocalPrefDataSource @Inject constructor(
}

fun clearLocalPref() {
with(prefs.edit()) { clear() }
prefs.edit { clear() }
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class LoginViewModel @Inject constructor(
fun login() {
if (!isValidInput()) {
_loginState.value = Failure(null)
authRepository.setAutoLogin(true)
return
}
authRepository.setAutoLogin(true)
_loginState.value = Success
}
}
4 changes: 2 additions & 2 deletions app/src/main/res/layout/item_home_repo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="@id/flow_repo_description"
app:layout_constraintStart_toStartOf="@id/flow_repo_description"
tools:text="@string/dummy_text" />
tools:text="@string/dummy" />

<TextView
android:id="@+id/tv_repo_owner"
Expand All @@ -52,7 +52,7 @@
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="@id/flow_repo_description"
app:layout_constraintStart_toStartOf="@id/flow_repo_description"
tools:text="@string/dummy_text" />
tools:text="@string/dummy" />

<androidx.constraintlayout.helper.widget.Flow
android:id="@+id/flow_repo_description"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<string name="hello_blank_fragment">Hello blank fragment</string>

<!-- common -->
<string name="dummy_text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</string>
<string name="dummy">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</string>
<string name="wrong_input_msg">잘못된 입력입니다.</string>
<string name="binding_error_msg">Binding not initialized to reference the view.</string>
<string name="view_type_error_msg">Unknown View Type : %d</string>
Expand Down

0 comments on commit 68876d8

Please sign in to comment.