This commit is contained in:
Peter Maquiran
2022-02-10 15:50:11 +01:00
parent 0cc6c1a84f
commit 808ad8c19f
6 changed files with 22 additions and 14 deletions
+8
View File
@@ -6,6 +6,7 @@ import { capitalizeTxt } from 'src/plugin/text'
import { NfService } from 'src/app/services/chat/nf.service'
import { WsChatService } from 'src/app/services/chat/ws-chat.service';
import { environment } from 'src/environments/environment';
import { showDateDuration } from 'src/plugin/showDateDuration';
@Injectable({
providedIn: 'root'
})
@@ -32,6 +33,7 @@ export class MessageService {
uploadingFile = false
errorUploadingAttachment = false
loadHistory = false
duration = ''
constructor(private storage: Storage,
private NfService: NfService,
@@ -73,6 +75,8 @@ export class MessageService {
this.displayType = this.file.type.replace('application/','').toUpperCase()
}
}
this.calDateDuration()
}
private usernameToDisplayName(username) {
@@ -170,4 +174,8 @@ export class MessageService {
}
private calDateDuration(date = null) {
this.duration = showDateDuration(date || this._updatedAt);
}
}