mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Allow list scrolling to extend to edge
This commit is contained in:
@@ -995,10 +995,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
if(chatId == DcChat.DC_CHAT_NO_CHAT)
|
||||
throw new IllegalStateException("can't display a conversation for no chat.");
|
||||
dcChat = DcHelper.getContext(context).getChat(chatId);
|
||||
if (dcChat.isDeviceTalk() || dcChat.isInBroadcast()) {
|
||||
if (!dcChat.canSend()) {
|
||||
ViewUtil.applyWindowInsets(findViewById(R.id.root_layout), true, false, true, false);
|
||||
ViewUtil.applyWindowInsets(findViewById(R.id.fragment_content), false, true, false, true);
|
||||
fragment.hideBottomDivider();
|
||||
fragment.handleAdjustBottomLayout();
|
||||
}
|
||||
recipient = new Recipient(this, dcChat);
|
||||
glideRequests = GlideApp.with(this);
|
||||
|
||||
@@ -108,9 +108,9 @@ public class ConversationFragment extends MessageSelectorFragment
|
||||
public boolean isPaused;
|
||||
private Debouncer markseenDebouncer;
|
||||
private Rpc rpc;
|
||||
private boolean pendingHideBottomDivider;
|
||||
private boolean pendingAdjustBottomLayout;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
rpc = DcHelper.getRpc(getContext());
|
||||
@@ -161,9 +161,10 @@ public class ConversationFragment extends MessageSelectorFragment
|
||||
// with hardware layers, drawing may result in errors as "OpenGLRenderer: Path too large to be rendered into a texture"
|
||||
list.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
|
||||
if (pendingHideBottomDivider) {
|
||||
if (pendingAdjustBottomLayout) {
|
||||
bottomDivider.setVisibility(View.GONE);
|
||||
pendingHideBottomDivider = false;
|
||||
ViewUtil.applyWindowInsets(list, false, true, false, true);
|
||||
pendingAdjustBottomLayout = false;
|
||||
}
|
||||
|
||||
return view;
|
||||
@@ -204,13 +205,14 @@ public class ConversationFragment extends MessageSelectorFragment
|
||||
}
|
||||
}
|
||||
|
||||
public void hideBottomDivider() {
|
||||
public void handleAdjustBottomLayout() {
|
||||
if (bottomDivider != null) {
|
||||
bottomDivider.setVisibility(View.GONE);
|
||||
pendingHideBottomDivider = false;
|
||||
ViewUtil.applyWindowInsets(list, false, true, false, true);
|
||||
pendingAdjustBottomLayout = false;
|
||||
}
|
||||
else {
|
||||
pendingHideBottomDivider = true;
|
||||
pendingAdjustBottomLayout = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user