mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -8,6 +8,9 @@ import { Storage } from '@ionic/storage';
|
||||
import { PermissionService } from './permission.service';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
import { NetworkServiceService , ConnectionStatus} from 'src/app/services/network-service.service';
|
||||
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -26,7 +29,9 @@ export class ChatService {
|
||||
private storage: Storage,
|
||||
private storageService: StorageService,
|
||||
public p: PermissionService,
|
||||
private changeProfileService: ChangeProfileService,) {
|
||||
private changeProfileService: ChangeProfileService,
|
||||
private NetworkServiceService: NetworkServiceService,
|
||||
private RochetChatConnectorService: RochetChatConnectorService) {
|
||||
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.setheader();
|
||||
@@ -388,11 +393,19 @@ export class ChatService {
|
||||
this.timerEventTriggerDateLastUpdate = new Date();
|
||||
} catch (error) {
|
||||
|
||||
this.resetTimer();
|
||||
setTimeout(async() =>{
|
||||
if(this.NetworkServiceService.getCurrentNetworkStatus() == ConnectionStatus.Offline) {
|
||||
this.RochetChatConnectorService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx: async ()=> {
|
||||
this.resetTimer();
|
||||
await this.refreshtoken();
|
||||
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.resetTimer();
|
||||
await this.refreshtoken();
|
||||
}, 8000)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -402,10 +415,6 @@ export class ChatService {
|
||||
} else if (!this.headers) {
|
||||
this.setheader()
|
||||
this.refreshtoken()
|
||||
} else {
|
||||
setTimeout(async ()=>{
|
||||
await this.refreshtoken();
|
||||
}, 8000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "0e5b739df",
|
||||
"SHA": "0e5b739df5ede20a0b22df48ec861ec4c2921f6b",
|
||||
"shortSHA": "f70391df4",
|
||||
"SHA": "f70391df4ad342cfe8081f85f62118673adf75e4",
|
||||
"branch": "develop_bitOut-fix",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Tue Jan 3 22:04:33 2023 +0100'",
|
||||
"lastCommitMessage": "src/app/guards/auth.guard.ts",
|
||||
"lastCommitNumber": "4608",
|
||||
"lastCommitTime": "'Wed Jan 4 11:11:30 2023 +0100'",
|
||||
"lastCommitMessage": "fix login",
|
||||
"lastCommitNumber": "4609",
|
||||
"change": "",
|
||||
"changeStatus": "On branch develop_bitOut-fix\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/search/search.page.html\n\tmodified: src/app/pages/search/search.page.ts\n\tmodified: src/app/shared/header/header.page.ts\n\tmodified: src/environments/environment.ts",
|
||||
"changeStatus": "On branch develop_bitOut-fix\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/services/chat.service.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user