Skip to content

Commit e2e075d

Browse files
authored
UI glitch fixed, illegal state handled
Fixes #112 : UI glitch fixed, illegal state handled
2 parents 828e5ab + 5a008e9 commit e2e075d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/src/main/java/com/github/code/gambit/ui/fragment/home/main/HomeFragment.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ class HomeFragment : Fragment(R.layout.fragment_home), FileUrlClickCallback, Bot
146146
is HomeState.Error -> {
147147
binding.linearProgress.hide()
148148
urlComponent.hide()
149-
fileSearchComponent.setRefreshing(hide = true)
149+
if (this::fileSearchComponent.isInitialized) {
150+
fileSearchComponent.setRefreshing(hide = true)
151+
}
150152
longToast(it.message)
151153
}
152154
is HomeState.FilesLoaded -> {

app/src/main/res/layout/fragment_profile.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
android:layout_width="@dimen/profile_image_large_size"
2020
android:layout_height="@dimen/profile_image_large_size"
2121
android:layout_marginTop="64dp"
22-
app:cardCornerRadius="75dp"
22+
app:cardCornerRadius="59dp"
2323
app:layout_constraintEnd_toEndOf="parent"
2424
app:layout_constraintStart_toStartOf="parent"
2525
app:layout_constraintTop_toTopOf="parent">
@@ -29,7 +29,7 @@
2929
android:layout_width="match_parent"
3030
android:layout_height="match_parent"
3131
android:contentDescription="@string/profile_image"
32-
android:scaleType="centerCrop"
32+
android:scaleType="fitXY"
3333
android:src="@drawable/ic_default_dp" />
3434
</androidx.cardview.widget.CardView>
3535

0 commit comments

Comments
 (0)