Update to 2.0.1
This commit is contained in:
@@ -47,24 +47,9 @@ void Display::SetChatMessage(const char* role, const char* content) {
|
||||
|
||||
void Display::SetTheme(Theme* theme) {
|
||||
current_theme_ = theme;
|
||||
Settings settings("display", true);
|
||||
settings.SetString("theme", theme->name());
|
||||
}
|
||||
|
||||
void Display::SetMusicInfo(const char* song_name) {
|
||||
// 默认实现:对于非微信模式,将歌名显示在聊天消息标签中
|
||||
DisplayLockGuard lock(this);
|
||||
if (chat_message_label_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (song_name != nullptr && strlen(song_name) > 0) {
|
||||
std::string music_text = "";
|
||||
music_text += song_name;
|
||||
lv_label_set_text(chat_message_label_, music_text.c_str());
|
||||
SetEmotion(FONT_AWESOME_MUSIC);
|
||||
} else {
|
||||
lv_label_set_text(chat_message_label_, "");
|
||||
SetEmotion(FONT_AWESOME_NEUTRAL);
|
||||
if (theme != nullptr) {
|
||||
Settings settings("display", true);
|
||||
settings.SetString("theme", theme->name());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user