mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 20:19:42 +01:00
Fix an issue with cancelling bottom sheet
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
5227620689
commit
d189c49367
@ -22,6 +22,7 @@ package com.nextcloud.talk.controllers;
|
|||||||
|
|
||||||
import android.app.SearchManager;
|
import android.app.SearchManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
@ -807,14 +808,16 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
RouterTransaction.with(new OperationsMenuController(bundle))
|
RouterTransaction.with(new OperationsMenuController(bundle))
|
||||||
.popChangeHandler(new VerticalChangeHandler())
|
.popChangeHandler(new VerticalChangeHandler())
|
||||||
.pushChangeHandler(new VerticalChangeHandler()));
|
.pushChangeHandler(new VerticalChangeHandler()));
|
||||||
|
|
||||||
|
bottomSheet.setOnShowListener(dialog -> eventBus.post(new BottomSheetLockEvent(false, 0,
|
||||||
|
false, false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bottomSheet == null) {
|
if (bottomSheet == null) {
|
||||||
bottomSheet = new BottomSheet.Builder(getActivity()).setView(view).create();
|
bottomSheet = new BottomSheet.Builder(getActivity()).setView(view).create();
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomSheet.setOnShowListener(dialog -> eventBus.post(new BottomSheetLockEvent(false, 0,
|
bottomSheet.setOnDismissListener(dialog -> getActionBar().setDisplayHomeAsUpEnabled(getRouter().getBackstackSize() > 1));
|
||||||
false, false)));
|
|
||||||
|
|
||||||
bottomSheet.show();
|
bottomSheet.show();
|
||||||
}
|
}
|
||||||
|
@ -535,6 +535,7 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
}
|
}
|
||||||
|
|
||||||
bottomSheet.setOnShowListener(dialog -> new KeyboardUtils(getActivity(), bottomSheet.getLayout(), true));
|
bottomSheet.setOnShowListener(dialog -> new KeyboardUtils(getActivity(), bottomSheet.getLayout(), true));
|
||||||
|
bottomSheet.setOnDismissListener(dialog -> getActionBar().setDisplayHomeAsUpEnabled(getRouter().getBackstackSize() > 1));
|
||||||
bottomSheet.show();
|
bottomSheet.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public abstract class BaseController extends ButterKnifeController {
|
|||||||
protected void onAttach(@NonNull View view) {
|
protected void onAttach(@NonNull View view) {
|
||||||
setTitle();
|
setTitle();
|
||||||
if (getActionBar() != null) {
|
if (getActionBar() != null) {
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(getRouter().getBackstackSize() > 1);
|
getActionBar().setDisplayHomeAsUpEnabled(getParentController() != null || getRouter().getBackstackSize() > 1);
|
||||||
}
|
}
|
||||||
super.onAttach(view);
|
super.onAttach(view);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user