mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'feature/ios-notification' of https://bitbucket.org/equilibriumito/gabinete-digital-fo into feature/ios-notification
This commit is contained in:
@@ -390,7 +390,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = 42;
|
CURRENT_PROJECT_VERSION = 43;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS;
|
||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
@@ -419,7 +419,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = 42;
|
CURRENT_PROJECT_VERSION = 43;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 94BRNM2LSS;
|
||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
|
|||||||
@@ -114,10 +114,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
|
this.open();
|
||||||
this.ChatSystemService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
|
|
||||||
this.ChatSystemService.openRoom(this.roomId)
|
|
||||||
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.scrollToBottomClicked()
|
this.scrollToBottomClicked()
|
||||||
@@ -133,6 +130,20 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open() {
|
||||||
|
try {
|
||||||
|
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
|
||||||
|
this.ChatSystemService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
|
||||||
|
this.ChatSystemService.openRoom(this.roomId)
|
||||||
|
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.open()
|
||||||
|
}, 3000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.loggedUser = this.loggedUserChat;
|
this.loggedUser = this.loggedUserChat;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { MessageModel, DeleteMessageModel } from '../../models/beast-orm';
|
|||||||
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
|
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
|
||||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||||
import { ChatService } from 'src/app/services/chat.service';
|
import { ChatService } from 'src/app/services/chat.service';
|
||||||
|
import { NotificationHolderService } from 'src/app/store/notification-holder.service';
|
||||||
import { Platform } from '@ionic/angular';
|
import { Platform } from '@ionic/angular';
|
||||||
import { FirstEnterService } from '../../services/first-enter.service';
|
import { FirstEnterService } from '../../services/first-enter.service';
|
||||||
import { Storage } from '@ionic/storage';
|
import { Storage } from '@ionic/storage';
|
||||||
@@ -58,6 +59,7 @@ export class LoginPage implements OnInit {
|
|||||||
private FirstEnterService: FirstEnterService,
|
private FirstEnterService: FirstEnterService,
|
||||||
private storage: Storage,
|
private storage: Storage,
|
||||||
private storageService: StorageService,
|
private storageService: StorageService,
|
||||||
|
private NotificationHolderService: NotificationHolderService
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() { }
|
ngOnInit() { }
|
||||||
@@ -154,6 +156,7 @@ export class LoginPage implements OnInit {
|
|||||||
this.RochetChatConnectorService.logout();
|
this.RochetChatConnectorService.logout();
|
||||||
this.clearStoreService.clear();
|
this.clearStoreService.clear();
|
||||||
this.ChatSystemService.clearChat();
|
this.ChatSystemService.clearChat();
|
||||||
|
this.NotificationHolderService.clear()
|
||||||
SessionStore.delete();
|
SessionStore.delete();
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
await MessageModel.deleteAll();
|
await MessageModel.deleteAll();
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export class ChatSystemService {
|
|||||||
this.getUserStatus();
|
this.getUserStatus();
|
||||||
await this.chatService.refreshtoken();
|
await this.chatService.refreshtoken();
|
||||||
|
|
||||||
await this.restoreUsers();
|
this.restoreUsers();
|
||||||
await this.getUser();
|
await this.getUser();
|
||||||
await this.restoreRooms();
|
await this.restoreRooms();
|
||||||
await this.getAllRooms();
|
await this.getAllRooms();
|
||||||
@@ -410,7 +410,14 @@ export class ChatSystemService {
|
|||||||
const room = this.getRoomById(id);
|
const room = this.getRoomById(id);
|
||||||
|
|
||||||
if (!room.subscribeAttempt) {
|
if (!room.subscribeAttempt) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
room.subscribeAttempt = true;
|
room.subscribeAttempt = true;
|
||||||
|
} catch (error) {
|
||||||
|
console.log("error")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.RochetChatConnectorService.streamRoomMessages(id).then((subscription) => {
|
this.RochetChatConnectorService.streamRoomMessages(id).then((subscription) => {
|
||||||
room.status.receive.message = true;
|
room.status.receive.message = true;
|
||||||
|
|||||||
@@ -157,4 +157,13 @@ export class NotificationHolderService {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
clear() {
|
||||||
|
this._notificationList = []
|
||||||
|
this.zone.run(() => {
|
||||||
|
this.save()
|
||||||
|
this.reverse()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user