mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
recei and clear the code
This commit is contained in:
@@ -121,7 +121,33 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
onChange(event) {
|
||||
const textSearch = event.detail.value;
|
||||
|
||||
const filteredUserList: (UserContacts & {isChecked: boolean})[] = this.FilterUserListedByTextSearch(textSearch) as any
|
||||
|
||||
const userContainer = {}
|
||||
for(const user of filteredUserList) {
|
||||
const firstLetter = user.wxFullName.charAt(0)
|
||||
if(!userContainer[firstLetter]) {
|
||||
userContainer[firstLetter] = [user]
|
||||
} else {
|
||||
userContainer[firstLetter].push(user)
|
||||
}
|
||||
}
|
||||
this.userContainer = userContainer
|
||||
}
|
||||
|
||||
|
||||
FilterUserListedByTextSearch(textSearch: string) {
|
||||
return this.allChatUsers.filter( e => e.wxFullName.toLowerCase().includes(textSearch.toLowerCase())).sort((a,b) => {
|
||||
if(a.wxFullName < b.wxFullName) {
|
||||
return -1;
|
||||
}
|
||||
if(a.wxFullName > b.wxFullName) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
clicked() {}
|
||||
|
||||
@@ -22,7 +22,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { Observable as DexieObservable } from 'Dexie';
|
||||
import { Observable, Subscription } from 'rxjs';
|
||||
import { RoomLocalRepository } from 'src/app/module/chat/data/repository/room-local-repository.service'
|
||||
import { RoomLocalRepository } from 'src/app/module/chat/data/repository/room/room-local-repository.service'
|
||||
import { MemberListLocalRepository } from 'src/app/module/chat/data/repository/member-list-local-repository.service'
|
||||
import { MessageTable } from 'src/app/module/chat/infra/database/dexie/schema/message';
|
||||
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service';
|
||||
@@ -243,6 +243,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.messages1[this.roomId].push(LastMessage)
|
||||
|
||||
this.loadAttachment()
|
||||
setTimeout(() => {
|
||||
this.sendReadMessage()
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user