mirror of https://github.com/NekoX-Dev/NekoX.git
fix user status at first enter
This commit is contained in:
parent
780dc4d5b6
commit
1c3495c92e
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue