Delete old room list

This commit is contained in:
Nicolas Werner 2021-05-28 23:25:57 +02:00
parent 298822baea
commit 03d30a2abc
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
23 changed files with 76 additions and 3082 deletions

View file

@ -109,10 +109,6 @@ MainWindow::MainWindow(QWidget *parent)
userSettingsPage_, SIGNAL(trayOptionChanged(bool)), trayIcon_, SLOT(setVisible(bool)));
connect(
userSettingsPage_, &UserSettingsPage::themeChanged, chat_page_, &ChatPage::themeChanged);
connect(userSettingsPage_,
&UserSettingsPage::decryptSidebarChanged,
chat_page_,
&ChatPage::decryptSidebarChanged);
connect(trayIcon_,
SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this,
@ -176,20 +172,6 @@ MainWindow::setWindowTitle(int notificationCount)
QMainWindow::setWindowTitle(name);
}
void
MainWindow::showEvent(QShowEvent *event)
{
adjustSideBars();
QMainWindow::showEvent(event);
}
void
MainWindow::resizeEvent(QResizeEvent *event)
{
adjustSideBars();
QMainWindow::resizeEvent(event);
}
bool
MainWindow::event(QEvent *event)
{
@ -203,22 +185,6 @@ MainWindow::event(QEvent *event)
return QMainWindow::event(event);
}
void
MainWindow::adjustSideBars()
{
const auto sz = splitter::calculateSidebarSizes(QFont{});
const uint64_t timelineWidth = chat_page_->timelineWidth();
const uint64_t minAvailableWidth = sz.collapsePoint + sz.groups;
nhlog::ui()->info("timelineWidth: {}, min {}", timelineWidth, minAvailableWidth);
if (timelineWidth < minAvailableWidth) {
chat_page_->hideSideBars();
} else {
chat_page_->showSideBars();
}
}
void
MainWindow::restoreWindowSize()
{