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