Skip to content

Commit

Permalink
fix: Show Full About
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Feb 10, 2024
1 parent 5c68d9c commit cc7fb3c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ protected void onDraw(Canvas canvas) {
backgroundPaint.setColor(Theme.getColor(Theme.key_windowBackgroundWhite, resourcesProvider));

setWillNotDraw(false);
if (NaConfig.INSTANCE.getShowFullAbout().Bool()) {
onClick();
}
}

protected int processColor(int color) {
Expand Down Expand Up @@ -717,6 +714,10 @@ private void checkTextLayout(int maxWidth, boolean force) {
textLayout = makeTextLayout(stringBuilder, maxWidth);
shouldExpand = textLayout.getLineCount() >= 4; // && valueTextView.getVisibility() != View.VISIBLE;

if (NaConfig.INSTANCE.getShowFullAbout().Bool() && shouldExpand) {
shouldExpand = false;
}

if (textLayout.getLineCount() >= 3 && shouldExpand) {
int end = Math.max(textLayout.getLineStart(2), textLayout.getLineEnd(2));
if (stringBuilder.charAt(end - 1) == '\n')
Expand Down

0 comments on commit cc7fb3c

Please sign in to comment.