minor UI fixes

This commit is contained in:
sairaj mote 2022-06-21 01:03:02 +05:30
parent 13fa11b6e4
commit a6903f1675
4 changed files with 7 additions and 19 deletions

View File

@ -947,7 +947,7 @@ sm-button[variant=primary] {
.group-icon {
height: 1.6rem;
width: 1.6rem;
fill: rgba(var(--text-color), 1);
fill: white;
}
.contact {
@ -1089,10 +1089,6 @@ sm-button[variant=primary] {
#warn_no_encryption,
.date-card,
.group-event-card {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 1;
padding: 0.4rem 0.6rem;
font-weight: 500;
font-size: 0.8rem;

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -840,7 +840,7 @@ sm-button[variant="primary"] {
.group-icon {
height: 1.6rem;
width: 1.6rem;
fill: rgba(var(--text-color), 1);
fill: white;
}
.contact {
position: relative;
@ -976,9 +976,6 @@ sm-button[variant="primary"] {
#warn_no_encryption,
.date-card,
.group-event-card {
position: sticky;
top: 0;
z-index: 1;
padding: 0.4rem 0.6rem;
font-weight: 500;
font-size: 0.8rem;

View File

@ -1469,7 +1469,7 @@
}
})
}, {
threshold: 0.3
root: this.lazyContainer
})
this.mutationObserver = new MutationObserver(mutationList => {
mutationList.forEach(mutation => {
@ -1516,8 +1516,8 @@
} else {
this.intersectionObserver.disconnect()
if (this.bottomFirst) {
this.updateStartIndex = this.arrayOfElements.length - this.batchSize - 1
this.updateEndIndex = this.arrayOfElements.length
this.updateStartIndex = this.updateEndIndex - this.batchSize - 1
} else {
this.updateStartIndex = 0
this.updateEndIndex = this.batchSize
@ -1851,14 +1851,9 @@
// rendering Date card when date changes after a message
let dateCard
if (!renderedDates.hasOwnProperty(messageDate) || renderedDates[messageDate] > timestamp) {
getRef('messages_container').querySelectorAll(`.date-card[data-date="${messageDate}"]`).forEach(card => card.remove())
dateCard = html.node`<time class="date-card" data-date="${messageDate}">${messageDate}</time>`
renderedDates[messageDate] = timestamp
const previousDateCard = getRef('messages_container').querySelector(`.date-card[data-date="${messageDate}"]`)
if (previousDateCard) {
dateCard = previousDateCard.cloneNode(true)
previousDateCard.remove()
} else {
dateCard = html.node`<time class="date-card" data-date="${messageDate}">${messageDate}</time>`
}
}
const className = `message ${category} ${unconfirmed ? 'unconfirmed' : ''} ${senderName ? 'distinct-sender' : ''}`
return html.node`