@ -35,10 +35,7 @@ public:
settings.setValue(path_, isNotificationsEnabled_);
};
bool isNotificationsEnabled()
{
return isNotificationsEnabled_;
bool isNotificationsEnabled() { return isNotificationsEnabled_; };
void toggleNotifications()
@ -19,23 +19,11 @@ public:
void start();
void stop();
QColor color()
return color_;
}
void setColor(QColor color)
color_ = color;
int interval()
return interval_;
void setInterval(int interval)
interval_ = interval;
QColor color() { return color_; }
void setColor(QColor color) { color_ = color; }
int interval() { return interval_; }
void setInterval(int interval) { interval_ = interval; }
private slots:
void onTimeout();
@ -32,6 +32,7 @@
#include "StateEvent.h"
constexpr int MAX_INITIAL_SYNC_FAILURES = 5;
constexpr int SYNC_RETRY_TIMEOUT = 10000;
namespace events = matrix::events;
@ -347,7 +348,7 @@ ChatPage::syncFailed(const QString &msg)
return;
qWarning() << "Sync error:" << msg;
client_->sync();
QTimer::singleShot(SYNC_RETRY_TIMEOUT, this, [=]() { client_->sync(); });
// TODO: Should be moved in another class that manages this global list.
@ -26,10 +26,7 @@ EmojiItemDelegate::EmojiItemDelegate(QObject *parent)
data_ = new Emoji;
EmojiItemDelegate::~EmojiItemDelegate()
delete data_;
EmojiItemDelegate::~EmojiItemDelegate() { delete data_; }
void
EmojiItemDelegate::paint(QPainter *painter,
@ -2,10 +2,7 @@
#include "ThemeManager.h"
ThemeManager::ThemeManager()
setTheme(new Theme);
ThemeManager::ThemeManager() { setTheme(new Theme); }
ThemeManager::setTheme(Theme *theme)