add folder cache

This commit is contained in:
unknown 2025-10-03 23:58:19 +03:00
parent 03d86422b8
commit f3ebe4f298
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
from PySide6.QtWidgets import QWidget, QListWidget, QVBoxLayout, QListWidgetItem
from PySide6.QtWidgets import QWidget, QListWidget, QVBoxLayout, QListWidgetItem, QAbstractItemView
from PySide6.QtCore import Qt, QSize, Signal
from typing import List
from app.core.models.chat_models import PrivateChatListItem
@ -25,6 +25,8 @@ class ChatListView(QWidget):
self.chat_list = QListWidget()
self.chat_list.setSpacing(2)
# Disable selection to avoid persistent click highlight
self.chat_list.setSelectionMode(QAbstractItemView.NoSelection)
self.chat_list.itemClicked.connect(self.on_chat_item_clicked)
layout.addWidget(self.chat_list)
@ -36,6 +38,8 @@ class ChatListView(QWidget):
chat_id = self.chat_items_map.get(id(item))
if chat_id:
self.chat_selected.emit(chat_id)
# Remove focus to avoid blue outline after selection
self.chat_list.clearFocus()
def update_theme(self):
"""Обновляет стили в соответствии с темой."""
@ -53,9 +57,6 @@ class ChatListView(QWidget):
QListWidget::item:hover {{
background-color: {palette['hover']};
}}
QListWidget::item:selected {{
background-color: {palette['selected']};
}}
QScrollBar:vertical {{
border: none;
background: {palette['primary']};

BIN
cache/images/avatars/example.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB