mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 18:55:05 +01:00
Partly fix back button in ringtone selection
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
879098ca8c
commit
75fbf37210
@ -82,7 +82,7 @@ public class RingtoneSelectionController extends BaseController implements Flexi
|
|||||||
|
|
||||||
public RingtoneSelectionController(Bundle args) {
|
public RingtoneSelectionController(Bundle args) {
|
||||||
super(args);
|
super(args);
|
||||||
|
setHasOptionsMenu(true);
|
||||||
this.callNotificationSounds = args.getBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, false);
|
this.callNotificationSounds = args.getBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,11 +116,9 @@ public class RingtoneSelectionController extends BaseController implements Flexi
|
|||||||
protected void onAttach(@NonNull View view) {
|
protected void onAttach(@NonNull View view) {
|
||||||
super.onAttach(view);
|
super.onAttach(view);
|
||||||
|
|
||||||
setHasOptionsMenu(true);
|
|
||||||
if (getActionBar() != null) {
|
if (getActionBar() != null) {
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -233,16 +233,16 @@ public class SettingsController extends BaseController {
|
|||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, true);
|
bundle.putBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, true);
|
||||||
getRouter().pushController(RouterTransaction.with(new RingtoneSelectionController(bundle))
|
getRouter().pushController(RouterTransaction.with(new RingtoneSelectionController(bundle))
|
||||||
.pushChangeHandler(new HorizontalChangeHandler()
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
).popChangeHandler(new HorizontalChangeHandler()));
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
});
|
});
|
||||||
|
|
||||||
settingsMessageSound.setOnClickListener(v -> {
|
settingsMessageSound.setOnClickListener(v -> {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, false);
|
bundle.putBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, false);
|
||||||
getRouter().pushController(RouterTransaction.with(new RingtoneSelectionController(bundle))
|
getRouter().pushController(RouterTransaction.with(new RingtoneSelectionController(bundle))
|
||||||
.pushChangeHandler(new HorizontalChangeHandler()
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
).popChangeHandler(new HorizontalChangeHandler()));
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
});
|
});
|
||||||
|
|
||||||
addAccountButton.addPreferenceClickListener(view15 -> {
|
addAccountButton.addPreferenceClickListener(view15 -> {
|
||||||
|
@ -27,6 +27,7 @@ import android.view.View;
|
|||||||
import com.bluelinelabs.conductor.Controller;
|
import com.bluelinelabs.conductor.Controller;
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||||
import com.nextcloud.talk.controllers.AccountVerificationController;
|
import com.nextcloud.talk.controllers.AccountVerificationController;
|
||||||
|
import com.nextcloud.talk.controllers.MagicBottomNavigationController;
|
||||||
import com.nextcloud.talk.controllers.ServerSelectionController;
|
import com.nextcloud.talk.controllers.ServerSelectionController;
|
||||||
import com.nextcloud.talk.controllers.SwitchAccountController;
|
import com.nextcloud.talk.controllers.SwitchAccountController;
|
||||||
import com.nextcloud.talk.controllers.WebViewLoginController;
|
import com.nextcloud.talk.controllers.WebViewLoginController;
|
||||||
@ -91,7 +92,9 @@ public abstract class BaseController extends RefWatchingController {
|
|||||||
@Override
|
@Override
|
||||||
protected void onAttach(@NonNull View view) {
|
protected void onAttach(@NonNull View view) {
|
||||||
setTitle();
|
setTitle();
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(false);
|
if (!MagicBottomNavigationController.class.getName().equals(getClass().getName())) {
|
||||||
|
getActionBar().setDisplayHomeAsUpEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
super.onAttach(view);
|
super.onAttach(view);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user