Merge branch 'fix-read-marker-update' into 'dev'
Make sure read marker is updated correctly See merge request keanuapp/keanuapp-weblite!142
This commit is contained in:
commit
d81a91931d
5 changed files with 38 additions and 8 deletions
|
|
@ -77,6 +77,19 @@ body {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-dropdown {
|
||||||
|
margin: 0px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-alert {
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #ff3300;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.room-list-notification-count {
|
.room-list-notification-count {
|
||||||
|
|
|
||||||
7
src/assets/icons/ic_dropdown.vue
Normal file
7
src/assets/icons/ic_dropdown.vue
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<template>
|
||||||
|
<svg width="11" height="6" viewBox="0 0 11 6" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M5.5 3.21932L8.9822 0.289048C9.49482 -0.142463 10.2664 -0.0840681 10.7056 0.418955C11.1451 0.922246 11.0856 1.67975 10.5733 2.11099L6.29552 5.71092C5.83774 6.09636 5.16221 6.09636 4.70448 5.71092L0.42672 2.11099C-0.0856265 1.67975 -0.145103 0.92226 0.294406 0.418955C0.733642 -0.0840681 1.50517 -0.142463 2.0178 0.289048L5.5 3.21932Z"
|
||||||
|
fill="black" />
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
|
@ -528,7 +528,7 @@ export default {
|
||||||
if (!this.$config.experimental_voice_mode) return false;
|
if (!this.$config.experimental_voice_mode) return false;
|
||||||
return util.useVoiceMode(this.room);
|
return util.useVoiceMode(this.room);
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -1316,8 +1316,8 @@ export default {
|
||||||
let eventIdLast = null;
|
let eventIdLast = null;
|
||||||
if (!this.useVoiceMode) {
|
if (!this.useVoiceMode) {
|
||||||
const container = this.chatContainer;
|
const container = this.chatContainer;
|
||||||
const elFirst = util.getFirstVisibleElement(container);
|
const elFirst = util.getFirstVisibleElement(container, (item) => item.hasAttribute("eventId"));
|
||||||
const elLast = util.getLastVisibleElement(container);
|
const elLast = util.getLastVisibleElement(container, (item) => item.hasAttribute("eventId"));
|
||||||
if (elFirst && elLast) {
|
if (elFirst && elLast) {
|
||||||
eventIdFirst = elFirst.getAttribute("eventId");
|
eventIdFirst = elFirst.getAttribute("eventId");
|
||||||
eventIdLast = elLast.getAttribute("eventId");
|
eventIdLast = elLast.getAttribute("eventId");
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@
|
||||||
@click.stop="onHeaderClicked"
|
@click.stop="onHeaderClicked"
|
||||||
>
|
>
|
||||||
<div class="room-name-inline text-truncate" :title="room.name">
|
<div class="room-name-inline text-truncate" :title="room.name">
|
||||||
{{ room.name }}
|
{{ room.name }}<v-icon class="icon-dropdown" size="11">$vuetify.icons.ic_dropdown</v-icon><div class="notification-alert" v-if="notifications"></div>
|
||||||
|
|
||||||
<!--<v-icon>expand_more</v-icon>-->
|
<!--<v-icon>expand_more</v-icon>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="num-members">{{ $tc("room.members", memberCount) }}</div>
|
<div class="num-members">{{ $tc("room.members", memberCount) }}</div>
|
||||||
|
|
@ -137,6 +138,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
},
|
||||||
|
notifications() {
|
||||||
|
return this.$matrix.joinedRooms.some(room => room.roomId !== this.$matrix.currentRoomId && room.getUnreadNotificationCount("total") > 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
||||||
|
|
@ -504,16 +504,22 @@ class Util {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getFirstVisibleElement(parentNode) {
|
getFirstVisibleElement(parentNode, where) {
|
||||||
const visible = this.findVisibleElements(parentNode);
|
let visible = this.findVisibleElements(parentNode);
|
||||||
|
if (visible) {
|
||||||
|
visible = visible.filter(where);
|
||||||
|
}
|
||||||
if (visible && visible.length > 0) {
|
if (visible && visible.length > 0) {
|
||||||
return visible[0];
|
return visible[0];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getLastVisibleElement(parentNode) {
|
getLastVisibleElement(parentNode, where) {
|
||||||
const visible = this.findVisibleElements(parentNode);
|
let visible = this.findVisibleElements(parentNode);
|
||||||
|
if (visible) {
|
||||||
|
visible = visible.filter(where);
|
||||||
|
}
|
||||||
if (visible && visible.length > 0) {
|
if (visible && visible.length > 0) {
|
||||||
return visible[visible.length - 1];
|
return visible[visible.length - 1];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue