mirror of https://github.com/M66B/FairEmail.git
Added try again to error screen
This commit is contained in:
parent
aca987277e
commit
b7c863d0b8
|
@ -44,6 +44,7 @@ public class ActivityError extends ActivityBase {
|
|||
private Button btnPassword;
|
||||
private ImageButton ibSetting;
|
||||
private ImageButton ibInfo;
|
||||
private Button btnReload;
|
||||
private Button btnSupport;
|
||||
|
||||
@Override
|
||||
|
@ -60,6 +61,7 @@ public class ActivityError extends ActivityBase {
|
|||
btnPassword = findViewById(R.id.btnPassword);
|
||||
ibSetting = findViewById(R.id.ibSetting);
|
||||
ibInfo = findViewById(R.id.ibInfo);
|
||||
btnReload = findViewById(R.id.btnReload);
|
||||
btnSupport = findViewById(R.id.btnSupport);
|
||||
|
||||
load();
|
||||
|
@ -177,6 +179,15 @@ public class ActivityError extends ActivityBase {
|
|||
}
|
||||
});
|
||||
|
||||
btnReload.setVisibility(account > 0 ? View.VISIBLE : View.GONE);
|
||||
btnReload.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ServiceSynchronize.reload(v.getContext(), account, true, "retry");
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
btnSupport.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -119,6 +119,17 @@
|
|||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="ibSetting,ibInfo" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnReload"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:drawableEnd="@drawable/twotone_sync_24"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/title_boundary_retry"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/barrier" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSupport"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -128,7 +139,7 @@
|
|||
android:drawablePadding="6dp"
|
||||
android:text="@string/menu_faq"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/barrier" />
|
||||
app:layout_constraintTop_toBottomOf="@id/btnReload" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in New Issue