Commit a5ca1571 authored by armin's avatar armin
Browse files

sd

parent 554ce8d7
......@@ -149,6 +149,9 @@ bool ChannelModel::addChannel( const QSharedPointer<RocketChatChannel> &channel
connect( channel.data(), &RocketChatChannel::channelDeleted, this, &ChannelModel::onDeleted, Qt::UniqueConnection );
duplicateCheck.insert( channel->getRoomId() );
int pos = channelList.findPosition( channel );
if(pos <0){
pos = 0;
}
beginInsertRows( QModelIndex(), pos, pos );
channelList.insertSort( channel );
endInsertRows();
......
......@@ -78,7 +78,7 @@ class ChannelModel : public QAbstractListModel
void unreadMessagesChanged( void );
public slots:
void addChannelSlot( const QSharedPointer<RocketChatChannel> & );
void addChannelSlot(const QSharedPointer<RocketChatChannel> &);
};
......
......@@ -255,6 +255,8 @@ android{
ios{
QMAKE_APPLE_DEVICE_ARCHS=arm64
QT += gui-private
SOURCES += websocket/linuxwebsocket/websocketlinux.cpp \
......
......@@ -32,7 +32,7 @@ ApplePushNotifications::ApplePushNotifications()
connect( mNotificationInstance, &IosNotificationReceiver::switchChannelByName, this, &ApplePushNotifications::onSwitchRequest );
}
void ApplePushNotifications::receiveMessage(const QString &pServer, const QString &pRid,const QString &pName,const QString &pType )
void ApplePushNotifications::receiveMessage(QString pServer, QString pRid,QString pName,QString pType )
{
emit messageReceived( pServer, pRid, pName, pType );
}
......@@ -60,7 +60,7 @@ void ApplePushNotifications::checkForPendingMessages()
emit switchChannelByName( mRoomName );
}
void ApplePushNotifications::onSwitchRequest( const QString &pName )
void ApplePushNotifications::onSwitchRequest( QString pName )
{
mRoomName = pName;
emit switchChannelByName( pName );
......
......@@ -22,7 +22,7 @@
#ifndef APPLEPUSHNOTIFICATIONS_H
#define APPLEPUSHNOTIFICATIONS_H
#include "notifications/notificationabstract.h"
#include "../notificationabstract.h"
#include "iosdevicetokenstorage.h"
#include "iosnotificationreceiver.h"
......@@ -31,11 +31,11 @@ class ApplePushNotifications: public NotificationAbstract
public:
virtual void registerWithService();
ApplePushNotifications();
void receiveMessage( const QString &server, const QString &rid, const QString &name, const QString &type );
void receiveMessage( QString server, QString rid, QString name, QString type );
void checkForPendingMessages();
void onSwitchRequest( const QString &pName );
void onSwitchRequest( QString pName );
protected:
void receiveToken();
......
......@@ -48,6 +48,7 @@ class NotificationAbstract : public QObject
void messageReceived( QString pServer, QString pRid, QString pName, QString pType );
void switchChannelByName( QString pChannel );
};
#endif // NOTIFICATIONABSTRACT_H
......@@ -25,7 +25,7 @@
#include "notifications/android/googlepushnotifications.h"
#endif
#ifdef Q_OS_IOS
#include "notifications/ios/ApplePushNotifications.h"
#include "notifications/ios/applepushnotifications.h"
#endif
#include "QDebug"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment