fix user status at first enter

This commit is contained in:
luvletter2333 2022-06-25 20:39:52 +08:00
parent 780dc4d5b6
commit 1c3495c92e
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
2 changed files with 13 additions and 2 deletions

View File

@ -232,10 +232,17 @@ public class BotWebViewMenuContainer extends FrameLayout implements Notification
}
private void invalidateActionBar() {
int subtitleColor = ColorUtils.blendARGB(getColor(Theme.key_actionBarDefaultSubtitle), getColor(Theme.key_windowBackgroundWhiteGrayText), actionBarTransitionProgress);
ChatActivity chatActivity = parentEnterView.getParentFragment();
if (chatActivity == null || getVisibility() != VISIBLE) {
return;
}
ChatAvatarContainer avatarContainer = chatActivity.getAvatarContainer();
String subtitleDefaultColorKey = avatarContainer.getLastSubtitleColorKey() == null ? Theme.key_actionBarDefaultSubtitle : avatarContainer.getLastSubtitleColorKey();
int subtitleColor = ColorUtils.blendARGB(getColor(subtitleDefaultColorKey), getColor(Theme.key_windowBackgroundWhiteGrayText), actionBarTransitionProgress);
ActionBar actionBar = chatActivity.getActionBar();
actionBar.setBackgroundColor(ColorUtils.blendARGB(getColor(Theme.key_actionBarDefault), getColor(Theme.key_windowBackgroundWhite), actionBarTransitionProgress));
int backgroundColor = ColorUtils.blendARGB(getColor(Theme.key_actionBarDefault), getColor(Theme.key_windowBackgroundWhite), actionBarTransitionProgress);
actionBar.setBackgroundColor(backgroundColor);
actionBar.setItemsColor(ColorUtils.blendARGB(getColor(Theme.key_actionBarDefaultIcon), getColor(Theme.key_windowBackgroundWhiteBlackText), actionBarTransitionProgress), false);
actionBar.setItemsBackgroundColor(ColorUtils.blendARGB(getColor(Theme.key_actionBarDefaultSelector), getColor(Theme.key_actionBarWhiteSelector), actionBarTransitionProgress), false);
actionBar.setSubtitleColor(subtitleColor);

View File

@ -670,6 +670,10 @@ public class ChatAvatarContainer extends FrameLayout implements NotificationCent
}
}
public String getLastSubtitleColorKey() {
return lastSubtitleColorKey;
}
public void setChatAvatar(TLRPC.Chat chat) {
avatarDrawable.setInfo(chat);
if (avatarImageView != null) {