| 166 | } |
| 167 | |
| 168 | void ChatApp::switchChannel(const std::string& chatChannel) { |
| 169 | const auto trimmedChannel = chatChannel.substr(0, MAX_TARGET_LEN); |
| 170 | state.setCurrentChannel(trimmedChannel); |
| 171 | settings.chatChannel = trimmedChannel; |
| 172 | saveSettings(settings); |
| 173 | |
| 174 | { |
| 175 | auto lock = lvgl::getSyncLock()->asScopedLock(); |
| 176 | lock.lock(); |
| 177 | view.refreshMessageList(); |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | extern const AppManifest manifest = { |
| 182 | .appId = "Chat", |
no test coverage detected