mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Add a warning on the conversations list as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
01b760f97e
commit
37dc7d1df0
@ -270,6 +270,45 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
currentUser = userUtils.getCurrentUser();
|
currentUser = userUtils.getCurrentUser();
|
||||||
|
|
||||||
if (currentUser != null) {
|
if (currentUser != null) {
|
||||||
|
if (!currentUser.hasSpreedFeatureCapability("no-ping")) {
|
||||||
|
// Talk 4+
|
||||||
|
new LovelyStandardDialog(getActivity(), LovelyStandardDialog.ButtonLayout.HORIZONTAL)
|
||||||
|
.setTopColorRes(R.color.nc_darkRed)
|
||||||
|
.setIcon(DisplayUtils.getTintedDrawable(context.getResources(),
|
||||||
|
R.drawable.ic_timer_black_24dp, R.color.bg_default))
|
||||||
|
.setPositiveButtonColor(context.getResources().getColor(R.color.nc_darkRed))
|
||||||
|
.setCancelable(false)
|
||||||
|
.setTitle(R.string.nc_settings_server_eol_title)
|
||||||
|
.setMessage(R.string.nc_settings_server_eol)
|
||||||
|
.setPositiveButton(R.string.nc_settings_remove_account, new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
boolean otherUserExists = userUtils.scheduleUserForDeletionWithId(currentUser.getId());
|
||||||
|
|
||||||
|
OneTimeWorkRequest accountRemovalWork = new OneTimeWorkRequest.Builder(AccountRemovalWorker.class).build();
|
||||||
|
WorkManager.getInstance().enqueue(accountRemovalWork);
|
||||||
|
|
||||||
|
if (otherUserExists && getView() != null) {
|
||||||
|
onViewBound(getView());
|
||||||
|
onAttach(getView());
|
||||||
|
} else if (!otherUserExists) {
|
||||||
|
getRouter().setRoot(RouterTransaction.with(
|
||||||
|
new ServerSelectionController())
|
||||||
|
.pushChangeHandler(new VerticalChangeHandler())
|
||||||
|
.popChangeHandler(new VerticalChangeHandler()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton(R.string.nc_cancel, new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
getRouter().pushController(RouterTransaction.with(new SwitchAccountController()));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setInstanceStateHandler(ID_DELETE_CONVERSATION_DIALOG, saveStateHandler)
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
credentials = ApiUtils.getCredentials(currentUser.getUsername(), currentUser.getToken());
|
credentials = ApiUtils.getCredentials(currentUser.getUsername(), currentUser.getToken());
|
||||||
shouldUseLastMessageLayout = currentUser.hasSpreedFeatureCapability("last-room-activity");
|
shouldUseLastMessageLayout = currentUser.hasSpreedFeatureCapability("last-room-activity");
|
||||||
if (getActivity() != null && getActivity() instanceof MainActivity) {
|
if (getActivity() != null && getActivity() instanceof MainActivity) {
|
||||||
|
@ -85,6 +85,7 @@
|
|||||||
<string name="nc_settings_remove_confirmation">Please confirm your intent to remove the current account.</string>
|
<string name="nc_settings_remove_confirmation">Please confirm your intent to remove the current account.</string>
|
||||||
<string name="nc_settings_remove_account">Remove account</string>
|
<string name="nc_settings_remove_account">Remove account</string>
|
||||||
<string name="nc_settings_add_account">Add a new account</string>
|
<string name="nc_settings_add_account">Add a new account</string>
|
||||||
|
<string name="nc_settings_server_eol_title">Unsupported server</string>
|
||||||
<string name="nc_settings_server_eol">The server version is too old and not supported by this version of the
|
<string name="nc_settings_server_eol">The server version is too old and not supported by this version of the
|
||||||
Android app</string>
|
Android app</string>
|
||||||
<string name="nc_settings_server_almost_eol">The server version is very old and will not be supported in the next
|
<string name="nc_settings_server_almost_eol">The server version is very old and will not be supported in the next
|
||||||
|
Loading…
Reference in New Issue
Block a user