Officially rename error elephant to errorphant (#3922)
In honor of https://strangeobject.space/@esther/109866090382540100 https://masto.ai/@mynotaurus/110826349670549779
This commit is contained in:
parent
49fd2c8478
commit
cb8a09d3f7
File diff suppressed because one or more lines are too long
|
@ -174,13 +174,13 @@ class ListsActivity : BaseActivity(), Injectable, HasAndroidInjector {
|
|||
INITIAL, LOADING -> binding.messageView.hide()
|
||||
ERROR_NETWORK -> {
|
||||
binding.messageView.show()
|
||||
binding.messageView.setup(R.drawable.elephant_offline, R.string.error_network) {
|
||||
binding.messageView.setup(R.drawable.errorphant_offline, R.string.error_network) {
|
||||
viewModel.retryLoading()
|
||||
}
|
||||
}
|
||||
ERROR_OTHER -> {
|
||||
binding.messageView.show()
|
||||
binding.messageView.setup(R.drawable.elephant_error, R.string.error_generic) {
|
||||
binding.messageView.setup(R.drawable.errorphant_error, R.string.error_generic) {
|
||||
viewModel.retryLoading()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ class AnnouncementsActivity :
|
|||
is Error -> {
|
||||
binding.progressBar.hide()
|
||||
binding.swipeRefreshLayout.isRefreshing = false
|
||||
binding.errorMessageView.setup(R.drawable.elephant_error, R.string.error_generic) {
|
||||
binding.errorMessageView.setup(R.drawable.errorphant_error, R.string.error_generic) {
|
||||
refreshAnnouncements()
|
||||
}
|
||||
binding.errorMessageView.show()
|
||||
|
|
|
@ -60,13 +60,13 @@ class FiltersActivity : BaseActivity(), FiltersListener {
|
|||
when (state.loadingState) {
|
||||
FiltersViewModel.LoadingState.INITIAL, FiltersViewModel.LoadingState.LOADING -> binding.messageView.hide()
|
||||
FiltersViewModel.LoadingState.ERROR_NETWORK -> {
|
||||
binding.messageView.setup(R.drawable.elephant_offline, R.string.error_network) {
|
||||
binding.messageView.setup(R.drawable.errorphant_offline, R.string.error_network) {
|
||||
loadFilters()
|
||||
}
|
||||
binding.messageView.show()
|
||||
}
|
||||
FiltersViewModel.LoadingState.ERROR_OTHER -> {
|
||||
binding.messageView.setup(R.drawable.elephant_error, R.string.error_generic) {
|
||||
binding.messageView.setup(R.drawable.errorphant_error, R.string.error_generic) {
|
||||
loadFilters()
|
||||
}
|
||||
binding.messageView.show()
|
||||
|
|
|
@ -418,13 +418,13 @@ class NotificationsFragment :
|
|||
when ((loadState.refresh as LoadState.Error).error) {
|
||||
is IOException -> {
|
||||
binding.statusView.setup(
|
||||
R.drawable.elephant_offline,
|
||||
R.drawable.errorphant_offline,
|
||||
R.string.error_network
|
||||
) { adapter.retry() }
|
||||
}
|
||||
else -> {
|
||||
binding.statusView.setup(
|
||||
R.drawable.elephant_error,
|
||||
R.drawable.errorphant_error,
|
||||
R.string.error_generic
|
||||
) { adapter.retry() }
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ class TrendingFragment :
|
|||
|
||||
binding.swipeRefreshLayout.isRefreshing = false
|
||||
binding.messageView.setup(
|
||||
R.drawable.elephant_offline,
|
||||
R.drawable.errorphant_offline,
|
||||
R.string.error_network
|
||||
) { refreshContent() }
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ class TrendingFragment :
|
|||
|
||||
binding.swipeRefreshLayout.isRefreshing = false
|
||||
binding.messageView.setup(
|
||||
R.drawable.elephant_error,
|
||||
R.drawable.errorphant_error,
|
||||
R.string.error_generic
|
||||
) { refreshContent() }
|
||||
}
|
||||
|
|
|
@ -30,9 +30,9 @@ fun Throwable.getServerErrorMessage(): String? {
|
|||
|
||||
/** @return A drawable resource to accompany the error message for this throwable */
|
||||
fun Throwable.getDrawableRes(): Int = when (this) {
|
||||
is IOException -> R.drawable.elephant_offline
|
||||
is HttpException -> R.drawable.elephant_offline
|
||||
else -> R.drawable.elephant_error
|
||||
is IOException -> R.drawable.errorphant_offline
|
||||
is HttpException -> R.drawable.errorphant_offline
|
||||
else -> R.drawable.errorphant_error
|
||||
}
|
||||
|
||||
/** @return A string error message for this throwable */
|
||||
|
|
|
@ -33,7 +33,7 @@ class BackgroundMessageView @JvmOverloads constructor(
|
|||
orientation = VERTICAL
|
||||
|
||||
if (isInEditMode) {
|
||||
setup(R.drawable.elephant_offline, R.string.error_network) {}
|
||||
setup(R.drawable.errorphant_offline, R.string.error_network) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/elephant_error"
|
||||
tools:src="@drawable/errorphant_error"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
android:layout_gravity="center"
|
||||
android:src="@android:color/transparent"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/elephant_error"
|
||||
tools:src="@drawable/errorphant_error"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:src="@android:color/transparent"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"
|
||||
tools:src="@drawable/elephant_error"
|
||||
tools:src="@drawable/errorphant_error"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/elephant_error"
|
||||
tools:src="@drawable/errorphant_error"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/elephant_error"
|
||||
tools:src="@drawable/errorphant_error"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -53,4 +53,4 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/searchView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/elephant_error"
|
||||
tools:src="@drawable/errorphant_error"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/elephant_offline" />
|
||||
android:src="@drawable/errorphant_offline" />
|
||||
|
||||
<com.keylesspalace.tusky.view.ClickableSpanTextView
|
||||
android:id="@+id/messageTextView"
|
||||
|
|
Loading…
Reference in New Issue