+
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss
index 9455060d..e6b231c4 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss
@@ -8,6 +8,12 @@
color: #444444;
}
}
+ & > .mat-card-content {
+ height: 568px;
+ }
+ & > .mat-tab-body-wrapper {
+ height: calc(100% - 50px);
+ }
}
.dialog-tab-grouplist {
@@ -27,6 +33,14 @@
}
}
+.dialog-tab-chatlist {
+ height: 518px;
+ width: 100%;
+ .chat {
+ width: 100%;
+ }
+}
+
::ng-deep .dialog-tab-orglist {
width: 100%;
height: 380px;
@@ -102,10 +116,8 @@
}
}
-/*::ng-deep .mat-dialog-container {
+:ng-deep .mat-dialog-container {
.mat-tab-body-wrapper {
- height: 380px;
- width: 100%;
.mat-tab-body {
width: 100%;
height: 100%;
@@ -116,7 +128,12 @@
}
}
}
-
+::ng-deep .ps-content {
+ .cdk-virtual-scroll-viewport {
+ height: 100%;
+ }
+}
+/*:
.mat-tab-frame {
width: 100%;
height: 100%;
@@ -133,11 +150,7 @@
::ng-deep .mat-card > .mat-tab-labels {
border-bottom: 2px solid #dddddd;
}
-::ng-deep .ps-content {
- .cdk-virtual-scroll-viewport {
- height: 100%;
- }
-}
+
.list-item-frame {
width: 100%;
diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.scss b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.scss
index 0860127b..68733339 100644
--- a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.scss
+++ b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.scss
@@ -327,15 +327,6 @@ $ease-in-out: cubic-bezier(0.785, 0.135, 0.15, 0.86);
}
}
-.mat-card-content {
- .notice {
- p {
- line-height: 1.4em;
- margin-bottom: 10px;
- }
- }
-}
-
@media all and (max-width: 1400px) {
.slider {
&_content {
From 91cc673d806fe7bf010a23d6e77f02a398841efa Mon Sep 17 00:00:00 2001
From: richard-loafle <44828666+richard-loafle@users.noreply.github.com>
Date: Thu, 6 Feb 2020 16:00:56 +0900
Subject: [PATCH 3/4] bug of search is fixed
---
.../src/lib/components/messages.component.ts | 64 ++++++++++++-------
1 file changed, 40 insertions(+), 24 deletions(-)
diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts
index c9c1b5d7..6511a7f3 100644
--- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts
+++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts
@@ -425,29 +425,39 @@ export class MessagesComponent implements OnInit, OnDestroy {
useSwap: boolean,
addtionalOffset?: number
) {
- this.preSwapScroll(useHide, useSwap);
- if (!!preCallback) {
- preCallback();
- }
-
- this.virtualScroller.scrollInto(
- to,
- true,
- undefined !== this.storedScrollItemOffsetTop
- ? -this.storedScrollItemOffsetTop
- : undefined !== addtionalOffset
- ? -addtionalOffset
- : 0,
- 0,
- () => {
- setTimeout(() => {
- if (!!postCallback) {
- postCallback();
- }
- this.postSwapScroll(useHide, useSwap);
- });
+ if (!!to) {
+ this.preSwapScroll(useHide, useSwap);
+ if (!!preCallback) {
+ preCallback();
}
- );
+
+ this.virtualScroller.scrollInto(
+ to,
+ true,
+ undefined !== this.storedScrollItemOffsetTop
+ ? -this.storedScrollItemOffsetTop
+ : undefined !== addtionalOffset
+ ? -addtionalOffset
+ : 0,
+ 0,
+ () => {
+ setTimeout(() => {
+ if (!!postCallback) {
+ postCallback();
+ }
+ this.postSwapScroll(useHide, useSwap);
+ });
+ }
+ );
+ } else {
+ if (!!preCallback) {
+ preCallback();
+ }
+
+ if (!!postCallback) {
+ postCallback();
+ }
+ }
}
preSwapScroll(useHide: boolean, useSwap: boolean) {
@@ -526,6 +536,10 @@ export class MessagesComponent implements OnInit, OnDestroy {
false
);
} else {
+ if (!this.eventList || 0 === this.eventList.length) {
+ return;
+ }
+
const lastEvent =
!!this.eventList && 0 < this.eventList.length
? this.eventList[this.eventList.length - 1]
@@ -536,7 +550,9 @@ export class MessagesComponent implements OnInit, OnDestroy {
}
const isInViewPortItems = this.isInViewPortItems(lastEvent.seq);
this.swapScrollTo(
- this.eventList[this.eventList.length - 1],
+ !!this.gotoEventSeq
+ ? undefined
+ : this.eventList[this.eventList.length - 1],
() => {},
() => {
this.initalized = true;
@@ -547,7 +563,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
},
-1 === this.virtualScroller.viewPortInfo.endIndex ||
!isInViewPortItems,
- !isInViewPortItems
+ !isInViewPortItems || !!this.gotoEventSeq
);
}
}
From e518ed386ecfc74dbaed762f4e85896874325d03 Mon Sep 17 00:00:00 2001
From: richard-loafle <44828666+richard-loafle@users.noreply.github.com>
Date: Thu, 6 Feb 2020 16:15:52 +0900
Subject: [PATCH 4/4] bug fixed
---
.../src/lib/components/messages.component.ts | 70 ++++++++-----------
1 file changed, 30 insertions(+), 40 deletions(-)
diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts
index 6511a7f3..56af380a 100644
--- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts
+++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts
@@ -425,39 +425,29 @@ export class MessagesComponent implements OnInit, OnDestroy {
useSwap: boolean,
addtionalOffset?: number
) {
- if (!!to) {
- this.preSwapScroll(useHide, useSwap);
- if (!!preCallback) {
- preCallback();
- }
-
- this.virtualScroller.scrollInto(
- to,
- true,
- undefined !== this.storedScrollItemOffsetTop
- ? -this.storedScrollItemOffsetTop
- : undefined !== addtionalOffset
- ? -addtionalOffset
- : 0,
- 0,
- () => {
- setTimeout(() => {
- if (!!postCallback) {
- postCallback();
- }
- this.postSwapScroll(useHide, useSwap);
- });
- }
- );
- } else {
- if (!!preCallback) {
- preCallback();
- }
-
- if (!!postCallback) {
- postCallback();
- }
+ this.preSwapScroll(useHide, useSwap);
+ if (!!preCallback) {
+ preCallback();
}
+
+ this.virtualScroller.scrollInto(
+ to,
+ true,
+ undefined !== this.storedScrollItemOffsetTop
+ ? -this.storedScrollItemOffsetTop
+ : undefined !== addtionalOffset
+ ? -addtionalOffset
+ : 0,
+ 0,
+ () => {
+ setTimeout(() => {
+ if (!!postCallback) {
+ postCallback();
+ }
+ this.postSwapScroll(useHide, useSwap);
+ });
+ }
+ );
}
preSwapScroll(useHide: boolean, useSwap: boolean) {
@@ -540,6 +530,12 @@ export class MessagesComponent implements OnInit, OnDestroy {
return;
}
+ if (!!this.gotoEventSeq) {
+ this.gotoPosition(this.gotoEventSeq);
+ this.gotoEventSeq = undefined;
+ return;
+ }
+
const lastEvent =
!!this.eventList && 0 < this.eventList.length
? this.eventList[this.eventList.length - 1]
@@ -550,20 +546,14 @@ export class MessagesComponent implements OnInit, OnDestroy {
}
const isInViewPortItems = this.isInViewPortItems(lastEvent.seq);
this.swapScrollTo(
- !!this.gotoEventSeq
- ? undefined
- : this.eventList[this.eventList.length - 1],
+ this.eventList[this.eventList.length - 1],
() => {},
() => {
this.initalized = true;
- if (!!this.gotoEventSeq) {
- this.gotoPosition(this.gotoEventSeq);
- this.gotoEventSeq = undefined;
- }
},
-1 === this.virtualScroller.viewPortInfo.endIndex ||
!isInViewPortItems,
- !isInViewPortItems || !!this.gotoEventSeq
+ !isInViewPortItems
);
}
}