chatgui/chatgui-android: просмотр изображений с зумом + инфо о медиа

- chatgui: просмотрщик изображений (ImageViewerWindow) с зумом/поворотом
- chatgui: отправка картинок как image с определением разрешения и типа
- chatgui: у видео-пузыря строка info (res·size·bitrate) и бейдж только длительность
- chatgui: контекстное меню медиа (сохранить в файл/скачать)
- chatgui-android: большие emoji-only сообщения, битрейт/разрешение у видео
- chatgui-android: сохранение неактивных интерфейсов как закомментированные секции
- chatgui-android: отправка картинок по расширению (jpg/png/gif/bmp/webp)
- photo_sender: content-type и расширение по типу файла
This commit is contained in:
evgeny committed 2026-09-09 16:18:26 +03:00
1 parent ca16b46404
commit c474c37284
17 files changed
+854 -66

No files matched your search

+17
View File
@@ -10,6 +10,7 @@
#include "channelsettingsdialog.h"
#include "connmonitorwindow.h"
#include "videoplayer_window.h"
#include "imageviewer_window.h"
#include "creategroupdialog.h"
#include "invite_link.h"
#include "sound_manager.h"
@@ -379,6 +380,7 @@ void MainWindow::setupConnects() {
m_db->getUnreadCount(channelId, lastReadMsgId));
});
connect(m_messageList, &MessageList::openVideoRequested, this, &MainWindow::openVideo);
connect(m_messageList, &MessageList::openImageRequested, this, &MainWindow::openImage);
}
void MainWindow::setupTray() {
@@ -497,6 +499,21 @@ void MainWindow::openVideo(const QString& filePath) {
m_videoPlayer->playFile(filePath);
}
void MainWindow::openImage(const QString& filePath) {
if (!m_imageViewer) {
m_imageViewer = new ImageViewerWindow(nullptr);
connect(m_imageViewer, &ImageViewerWindow::closed, this, [this] {
m_imageViewer->deleteLater();
m_imageViewer = nullptr;
});
} else {
m_imageViewer->raise();
m_imageViewer->activateWindow();
}
m_imageViewer->loadFile(filePath);
m_imageViewer->showFullScreen();
}
void MainWindow::onMessageReceived(const char* ch_id, int ch_id_len, uint64_t author) {
QString cid = QString::fromUtf8(ch_id, ch_id_len);
if (m_db && author != m_db->myNodeId())