mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-11 06:44:09 +01:00
fix to show error message on server selection screen
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
2ff5be1294
commit
deb512af91
@ -203,7 +203,6 @@ class ServerSelectionController :
|
|||||||
private fun checkServerAndProceed() {
|
private fun checkServerAndProceed() {
|
||||||
dispose()
|
dispose()
|
||||||
var url: String = binding?.serverEntryTextInputEditText?.text.toString().trim { it <= ' ' }
|
var url: String = binding?.serverEntryTextInputEditText?.text.toString().trim { it <= ' ' }
|
||||||
binding?.serverEntryTextInputEditText?.isEnabled = false
|
|
||||||
showserverEntryProgressBar()
|
showserverEntryProgressBar()
|
||||||
if (binding?.importOrChooseProviderText?.visibility != View.INVISIBLE) {
|
if (binding?.importOrChooseProviderText?.visibility != View.INVISIBLE) {
|
||||||
binding?.importOrChooseProviderText?.visibility = View.INVISIBLE
|
binding?.importOrChooseProviderText?.visibility = View.INVISIBLE
|
||||||
@ -281,8 +280,6 @@ class ServerSelectionController :
|
|||||||
hideserverEntryProgressBar()
|
hideserverEntryProgressBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding?.serverEntryTextInputEditText?.isEnabled = true
|
|
||||||
|
|
||||||
if (binding?.importOrChooseProviderText?.visibility != View.INVISIBLE) {
|
if (binding?.importOrChooseProviderText?.visibility != View.INVISIBLE) {
|
||||||
binding?.importOrChooseProviderText?.visibility = View.VISIBLE
|
binding?.importOrChooseProviderText?.visibility = View.VISIBLE
|
||||||
binding?.certTextView?.visibility = View.VISIBLE
|
binding?.certTextView?.visibility = View.VISIBLE
|
||||||
@ -304,18 +301,17 @@ class ServerSelectionController :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setErrorText(text: String) {
|
private fun setErrorText(text: String) {
|
||||||
|
binding?.errorWrapper?.visibility = View.VISIBLE
|
||||||
binding?.errorText?.text = text
|
binding?.errorText?.text = text
|
||||||
binding?.errorText?.visibility = View.VISIBLE
|
hideserverEntryProgressBar()
|
||||||
binding?.serverEntryProgressBar?.visibility = View.GONE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showserverEntryProgressBar() {
|
private fun showserverEntryProgressBar() {
|
||||||
binding?.errorText?.visibility = View.GONE
|
binding?.errorWrapper?.visibility = View.INVISIBLE
|
||||||
binding?.serverEntryProgressBar?.visibility = View.VISIBLE
|
binding?.serverEntryProgressBar?.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideserverEntryProgressBar() {
|
private fun hideserverEntryProgressBar() {
|
||||||
binding?.errorText?.visibility = View.GONE
|
|
||||||
binding?.serverEntryProgressBar?.visibility = View.INVISIBLE
|
binding?.serverEntryProgressBar?.visibility = View.INVISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,23 +133,37 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/error_text"
|
android:id="@+id/error_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:lineSpacingMultiplier="1.2"
|
|
||||||
android:lines="2"
|
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="2dp"
|
||||||
android:text="@string/nc_server_unsupported"
|
|
||||||
android:textAlignment="viewStart"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:drawableStartCompat="@android:drawable/stat_sys_warning"
|
android:orientation="horizontal"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@android:drawable/stat_sys_warning">
|
||||||
|
</ImageView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/error_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:lineSpacingMultiplier="1.2"
|
||||||
|
android:lines="2"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
tools:text="@string/nc_server_unsupported" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/import_or_choose_provider_text"
|
android:id="@+id/import_or_choose_provider_text"
|
||||||
|
Loading…
Reference in New Issue
Block a user