mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 22:56:33 +02:00
Added error title
This commit is contained in:
@@ -43,6 +43,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
@@ -77,6 +78,7 @@ public class FragmentPop extends FragmentBase {
|
||||
private Button btnSave;
|
||||
private ContentLoadingProgressBar pbSave;
|
||||
private TextView tvError;
|
||||
private Group grpError;
|
||||
|
||||
private ContentLoadingProgressBar pbWait;
|
||||
|
||||
@@ -125,6 +127,7 @@ public class FragmentPop extends FragmentBase {
|
||||
pbSave = view.findViewById(R.id.pbSave);
|
||||
|
||||
tvError = view.findViewById(R.id.tvError);
|
||||
grpError = view.findViewById(R.id.grpError);
|
||||
|
||||
pbWait = view.findViewById(R.id.pbWait);
|
||||
|
||||
@@ -165,7 +168,7 @@ public class FragmentPop extends FragmentBase {
|
||||
tilPassword.setEndIconMode(id < 0 ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE);
|
||||
|
||||
pbSave.setVisibility(View.GONE);
|
||||
tvError.setVisibility(View.GONE);
|
||||
grpError.setVisibility(View.GONE);
|
||||
|
||||
return view;
|
||||
}
|
||||
@@ -195,7 +198,7 @@ public class FragmentPop extends FragmentBase {
|
||||
saving = true;
|
||||
getActivity().invalidateOptionsMenu();
|
||||
Helper.setViewsEnabled(view, false);
|
||||
tvError.setVisibility(View.GONE);
|
||||
grpError.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -398,7 +401,7 @@ public class FragmentPop extends FragmentBase {
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else {
|
||||
tvError.setText(Helper.formatThrowable(ex, false));
|
||||
tvError.setVisibility(View.VISIBLE);
|
||||
grpError.setVisibility(View.VISIBLE);
|
||||
|
||||
new Handler().post(new Runnable() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user