mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 02:17:43 +03:00
make info box generic
This commit is contained in:
parent
69ad131a5f
commit
456bde9cb3
2 changed files with 2 additions and 28 deletions
|
@ -1329,7 +1329,7 @@ public class FileDisplayActivity extends HookActivity
|
||||||
synchResult != null) {
|
synchResult != null) {
|
||||||
|
|
||||||
if (synchResult.isSuccess()) {
|
if (synchResult.isSuccess()) {
|
||||||
setMaintenanceMode(false);
|
hideInfoBox();
|
||||||
} else {
|
} else {
|
||||||
// TODO refactor and make common
|
// TODO refactor and make common
|
||||||
if (checkForRemoteOperationError(synchResult)) {
|
if (checkForRemoteOperationError(synchResult)) {
|
||||||
|
@ -1338,7 +1338,7 @@ public class FileDisplayActivity extends HookActivity
|
||||||
synchResult.getCode())) {
|
synchResult.getCode())) {
|
||||||
showUntrustedCertDialog(synchResult);
|
showUntrustedCertDialog(synchResult);
|
||||||
} else if (ResultCode.MAINTENANCE_MODE.equals(synchResult.getCode())) {
|
} else if (ResultCode.MAINTENANCE_MODE.equals(synchResult.getCode())) {
|
||||||
setMaintenanceMode(true);
|
showInfoBox(R.string.maintenance_mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,32 +154,6 @@ public abstract class ToolbarActivity extends BaseActivity {
|
||||||
return file == null || (file.isFolder() && file.getParentId() == FileDataStorageManager.ROOT_PARENT_ID);
|
return file == null || (file.isFolder() && file.getParentId() == FileDataStorageManager.ROOT_PARENT_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* de-/activates the maintenance message within the toolbar.
|
|
||||||
*
|
|
||||||
* @param active flag is mode should be de-/activated
|
|
||||||
*/
|
|
||||||
protected final void setMaintenanceMode(boolean active) {
|
|
||||||
if (active) {
|
|
||||||
showInfoBox(R.string.maintenance_mode);
|
|
||||||
} else {
|
|
||||||
hideInfoBox();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* de-/activates the offline message within the toolbar.
|
|
||||||
*
|
|
||||||
* @param active flag is mode should be de-/activated
|
|
||||||
*/
|
|
||||||
protected final void setOfflineMode(boolean active) {
|
|
||||||
if (active) {
|
|
||||||
showInfoBox(R.string.offline_mode);
|
|
||||||
} else {
|
|
||||||
hideInfoBox();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shows the toolbar's info box with the given text.
|
* shows the toolbar's info box with the given text.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue