Compare commits

...

2 Commits

Author SHA1 Message Date
luvletter2333 14fdabd0c2
fix: disable mapDrifting when useOSM in NekoGeneral 2022-08-31 00:03:41 +08:00
luvletter2333 34aff2a223
fix: NPE about currentBackgroundDrawable 2022-08-31 00:00:56 +08:00
2 changed files with 9 additions and 2 deletions

View File

@ -11592,6 +11592,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);
}
@ -11812,7 +11813,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);
@ -16342,6 +16344,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;
@ -16602,7 +16605,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
lastForwardedNamesOffset = namesOffset;
lastForwardNameWidth = forwardedNameWidth;
lastBackgroundLeft = getCurrentBackgroundLeft();
lastBackgroundRight = currentBackgroundDrawable.getBounds().right;
if (currentBackgroundDrawable != null)
lastBackgroundRight = currentBackgroundDrawable.getBounds().right;
reactionsLayoutInBubble.recordDrawingState();
if (replyNameLayout != null) {

View File

@ -774,6 +774,9 @@ public class NekoGeneralSettingsActivity extends BaseFragment {
NekoConfig.useOSMDroidMap.setConfigBool(true);
((ConfigCellTextCheck) useOSMDroidMapRow).setEnabled(false);
cellGroup.rows.remove(mapDriftingFixForGoogleMapsRow);
} else {
if (NekoConfig.useOSMDroidMap.Bool())
((ConfigCellTextCheck) mapDriftingFixForGoogleMapsRow).setEnabled(false);
}
boolean enabled;