Verhindere Eintrag als ungültiger Account

master
Niko Diamadis 5 years ago
parent dcdc77a134
commit 58d2a65cd5
Signed by: niko
GPG Key ID: BE53B0B17B1B142E

@ -186,6 +186,7 @@ class ListingFragment : Fragment() {
} else {
binding.fabContainer.visibility = View.INVISIBLE
adminMode = false
sharedPrefEditor.putString("technikerId", "")
sharedPrefEditor.putBoolean("admin", adminMode!!).apply()
Toasty.error(myContext, "Adminstatus unbekannt", Toasty.LENGTH_SHORT).show()
Log.e("TechnikLogger.TechSuche", e.message.toString())

@ -219,6 +219,10 @@ class ProjectFragment : Fragment() {
emptyCheck()
if (adminMode || sharedPref.getString("technikerId", "")!!.isNotBlank()) {
binding.addButton.visibility = View.VISIBLE
}
if (adminMode) {
binding.resetButton.visibility = View.VISIBLE
binding.resetButton.setOnClickListener {

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@ -172,7 +172,9 @@
android:layout_gravity="end"
android:contentDescription="Add Icon"
android:scaleType="fitEnd"
android:src="@drawable/_icon_add" />
android:visibility="gone"
android:src="@drawable/_icon_add"
tools:visibility="visible" />
</LinearLayout>

Loading…
Cancel
Save