return _isDesktopNotificationsAllowed;
}
-void AccountState::setDesktopNotificationsAllowed(const bool isAllowed)
+void AccountState::setDesktopNotificationsAllowed(bool isAllowed)
{
_isDesktopNotificationsAllowed = isAllowed;
}
/** Set desktop notifications status retrieved by the notificatons endpoint
*/
- void setDesktopNotificationsAllowed(const bool isAllowed);
+ void setDesktopNotificationsAllowed(bool isAllowed);
/** Fetch the user status (status, icon, message)
*/
}
}
-void ServerNotificationHandler::slotAllowDesktopNotificationsChanged(const bool isAllowed)
+void ServerNotificationHandler::slotAllowDesktopNotificationsChanged(bool isAllowed)
{
auto *account = qvariant_cast<AccountState *>(sender()->property(propertyAccountStateC));
if (account != nullptr) {
void slotNotificationsReceived(const QJsonDocument &json, int statusCode);
void slotEtagResponseHeaderReceived(const QByteArray &value, int statusCode);
void slotIconDownloaded(QByteArray iconData);
- void slotAllowDesktopNotificationsChanged(const bool isAllowed);
+ void slotAllowDesktopNotificationsChanged(bool isAllowed);
private:
QPointer<JsonApiJob> _notificationJob;
return _users[id]->isConnected();
}
-Q_INVOKABLE QUrl UserModel::statusIcon(const int &id)
+Q_INVOKABLE QUrl UserModel::statusIcon(int id)
{
if (id < 0 || id >= _users.size()) {
return {};
Q_INVOKABLE bool currentUserHasLocalFolder();
int currentUserId() const;
Q_INVOKABLE bool isUserConnected(const int &id);
- Q_INVOKABLE QUrl statusIcon(const int &id);
+ Q_INVOKABLE QUrl statusIcon(int id);
Q_INVOKABLE void switchCurrentUser(const int &id);
Q_INVOKABLE void login(const int &id);
Q_INVOKABLE void logout(const int &id);
_job->start();
}
-void UserStatus::slotFetchUserStatusFinished(const QJsonDocument &json, const int statusCode)
+void UserStatus::slotFetchUserStatusFinished(const QJsonDocument &json, int statusCode)
{
const QJsonObject defaultValues
{
QUrl icon() const;
private slots:
- void slotFetchUserStatusFinished(const QJsonDocument &json, const int statusCode);
+ void slotFetchUserStatusFinished(const QJsonDocument &json, int statusCode);
signals:
void fetchUserStatusFinished();
* @brief desktopNotificationStatusReceived - signal to report if notifications are allowed
* @param status - set desktop notifications allowed status
*/
- void allowDesktopNotificationsChanged(const bool isAllowed);
+ void allowDesktopNotificationsChanged(bool isAllowed);
private:
QUrlQuery _additionalParams;