Banners: requests lost on disconnect, spacer rows, tints and repeated decoding
- A picture download sent to the voice connection while it closes (or still queued when it ends) was dropped without an answer: its cache key stayed in flight and every later fetch of it, in any session, waited until the app restarted. The request now fails when dropped unanswered (ImageDownload), so the retries fetch it again. - Only top-level channels are spacers, as in TeamSpeak: a sub-channel named [cspacer…] keeps its name, its lock and its member count. Chat tabs, the voice headers and "In …" use the same title as the tree. - A banner covered its row's own background: our channel and the hovered row are tinted over the artwork again. A locked centred spacer shows its lock. - A picture that cannot be decoded is remembered as such instead of being read again on the UI thread at every refresh (every talking change); avatars and icons that arrive again are decoded again. - Cache::icon no longer opens and touches the file on every refresh of the server list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
This commit is contained in:
1 parent
e15ee3afb6
commit
742dc6ce94
8 files changed
+125
-20
No files matched your search
@@ -131,9 +131,16 @@ impl Cache {
|
||||
self.touch(&mut index, key)
|
||||
}
|
||||
|
||||
/// The cached server, channel, group or client icon, if available.
|
||||
/// The cached server, channel, group or client icon, if available. Not
|
||||
/// marked as used (no file is opened or touched): the UI asks on every
|
||||
/// refresh of the server list.
|
||||
pub fn icon(&self, id: u32) -> Option<PathBuf> {
|
||||
(id != 0).then(|| self.get(&icon_key(id))).flatten()
|
||||
if id == 0 {
|
||||
return None;
|
||||
}
|
||||
let key = icon_key(id);
|
||||
let path = self.dir.join(&key);
|
||||
(self.lock().entries.contains_key(&key) && path.is_file()).then_some(path)
|
||||
}
|
||||
|
||||
fn touch(&self, index: &mut Index, key: &str) -> Option<PathBuf> {
|
||||
|
||||
Reference in new issue
Block a user