style is modified

This commit is contained in:
richard-loafle 2020-01-29 18:02:57 +09:00
parent 9f9362c4bb
commit 14855d0703
2 changed files with 14 additions and 14 deletions

View File

@ -15,7 +15,6 @@ $tablet-s-width: 768px;
.message-row {
width: 100%;
height: 100%;
margin-bottom: 20px;
.date-splitter {
display: block;
width: 100%;
@ -26,6 +25,7 @@ $tablet-s-width: 768px;
display: flex;
flex-direction: row;
margin-left: 0;
padding-bottom: 20px;
.profile-img {
flex: 0 0 auto;
&.thumbnail-mask {

View File

@ -412,12 +412,12 @@ export class MessagesComponent implements OnInit, OnDestroy {
}
preSwapScroll(useHide: boolean, useSwap: boolean) {
if (useSwap && !this.swapped) {
this.chatMessagesBuffer.nativeElement.innerHTML = this.chatMessagesContainer.nativeElement.innerHTML;
this.chatMessagesBuffer.nativeElement.scrollTop = this.chatMessagesContainer.nativeElement.scrollTop;
this.chatMessagesBuffer.nativeElement.classList.remove('disappear');
this.swapped = true;
}
// if (useSwap && !this.swapped) {
// this.chatMessagesBuffer.nativeElement.innerHTML = this.chatMessagesContainer.nativeElement.innerHTML;
// this.chatMessagesBuffer.nativeElement.scrollTop = this.chatMessagesContainer.nativeElement.scrollTop;
// this.chatMessagesBuffer.nativeElement.classList.remove('disappear');
// this.swapped = true;
// }
if (useHide && !this.hidden) {
this.chatMessagesContainer.nativeElement.classList.add('hide');
@ -426,12 +426,12 @@ export class MessagesComponent implements OnInit, OnDestroy {
}
postSwapScroll(useHide: boolean, useSwap: boolean) {
if (useSwap && this.swapped) {
this.chatMessagesBuffer.nativeElement.innerHTML = '';
this.chatMessagesBuffer.nativeElement.scrollTop = 0;
this.chatMessagesBuffer.nativeElement.classList.add('disappear');
this.swapped = false;
}
// if (useSwap && this.swapped) {
// this.chatMessagesBuffer.nativeElement.innerHTML = '';
// this.chatMessagesBuffer.nativeElement.scrollTop = 0;
// this.chatMessagesBuffer.nativeElement.classList.add('disappear');
// this.swapped = false;
// }
if (useHide && this.hidden) {
this.chatMessagesContainer.nativeElement.classList.remove('hide');
@ -536,7 +536,7 @@ export class MessagesComponent implements OnInit, OnDestroy {
if (this.scrollUpInitalized && this.eventRemained) {
this.storeScrollPosition();
this.preSwapScroll(true, true);
this.preSwapScroll(false, false);
this.moreEvent.emit(this.eventList[0].seq);