mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-11-23 02:45:34 +01:00
fix: NPE about currentBackgroundDrawable
This commit is contained in:
parent
2eb50eca97
commit
f11f97bd2e
@ -12437,6 +12437,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
h = view.getMeasuredHeight();
|
||||
}
|
||||
}
|
||||
if (drawable != null)
|
||||
drawable.setTop((int) (parentViewTopOffset + offset), w, h, (int) parentViewTopOffset, blurredViewTopOffset, blurredViewBottomOffset, pinnedTop, pinnedBottom || transitionParams.changePinnedBottomProgress != 1);
|
||||
}
|
||||
|
||||
@ -12675,7 +12676,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
if (selectionOverlayPaint.getAlpha() > 0) {
|
||||
canvas.save();
|
||||
canvas.clipRect(0, 0, getMeasuredWidth(), getMeasuredHeight());
|
||||
currentBackgroundDrawable.drawCached(canvas, backgroundCacheParams, selectionOverlayPaint);
|
||||
if (currentBackgroundDrawable != null)
|
||||
currentBackgroundDrawable.drawCached(canvas, backgroundCacheParams, selectionOverlayPaint);
|
||||
canvas.restore();
|
||||
}
|
||||
selectionOverlayPaint.setAlpha(wasAlpha);
|
||||
@ -17753,6 +17755,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
|
||||
public int getCurrentBackgroundLeft() {
|
||||
if (currentBackgroundDrawable == null) {
|
||||
FileLog.e("getCurrentBackgroundLeft accessed when currentBackgroundDrawable is null");
|
||||
return 0;
|
||||
}
|
||||
int left = currentBackgroundDrawable.getBounds().left;
|
||||
@ -18039,7 +18042,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
lastForwardedNamesOffset = namesOffset;
|
||||
lastForwardNameWidth = forwardedNameWidth;
|
||||
lastBackgroundLeft = getCurrentBackgroundLeft();
|
||||
lastBackgroundRight = getCurrentBackgroundRight();
|
||||
if (currentBackgroundDrawable != null)
|
||||
lastBackgroundRight = getCurrentBackgroundRight();
|
||||
|
||||
reactionsLayoutInBubble.recordDrawingState();
|
||||
if (replyNameLayout != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user