mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
fix date
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ export class RoomService {
|
||||
let ChatMessage = _ChatMessage.fields.args[0]
|
||||
|
||||
ChatMessage = this.fix_updatedAt(ChatMessage)
|
||||
console.log('recivemessage', JSON.stringify(_ChatMessage))
|
||||
console.log('recivemessage', ChatMessage)
|
||||
|
||||
const message = this.prepareMessage(ChatMessage)
|
||||
this.lastMessage = message
|
||||
@@ -114,7 +114,7 @@ export class RoomService {
|
||||
}
|
||||
|
||||
this.addMessageDB(ChatMessage)
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
this.scrollDown()
|
||||
}, 50)
|
||||
|
||||
Reference in New Issue
Block a user