mirror of https://github.com/vector-im/riot-web
Merge pull request #6939 from matrix-org/dbkr/fix_room_list_on_unsent_message
Fix bug where room list would get stuck showing no roomspull/21833/head
commit
ed9d006615
|
@ -37,6 +37,7 @@ interface ICategoryIndex {
|
||||||
// comments! Check the usage of Category carefully to figure out what needs changing
|
// comments! Check the usage of Category carefully to figure out what needs changing
|
||||||
// if you're going to change this array's order.
|
// if you're going to change this array's order.
|
||||||
const CATEGORY_ORDER = [
|
const CATEGORY_ORDER = [
|
||||||
|
NotificationColor.Unsent,
|
||||||
NotificationColor.Red,
|
NotificationColor.Red,
|
||||||
NotificationColor.Grey,
|
NotificationColor.Grey,
|
||||||
NotificationColor.Bold,
|
NotificationColor.Bold,
|
||||||
|
@ -50,9 +51,10 @@ const CATEGORY_ORDER = [
|
||||||
* interfere with this algorithm, however manual ordering does.
|
* interfere with this algorithm, however manual ordering does.
|
||||||
*
|
*
|
||||||
* The importance of a room is defined by the kind of notifications, if any, are
|
* The importance of a room is defined by the kind of notifications, if any, are
|
||||||
* present on the room. These are classified internally as Red, Grey, Bold, and
|
* present on the room. These are classified internally as Unsent, Red, Grey,
|
||||||
* Idle. Red rooms have mentions, grey have unread messages, bold is a less noisy
|
* Bold, and Idle. 'Unsent' rooms have unsent messages, Red rooms have mentions,
|
||||||
* version of grey, and idle means all activity has been seen by the user.
|
* grey have unread messages, bold is a less noisy version of grey, and idle
|
||||||
|
* means all activity has been seen by the user.
|
||||||
*
|
*
|
||||||
* The algorithm works by monitoring all room changes, including new messages in
|
* The algorithm works by monitoring all room changes, including new messages in
|
||||||
* tracked rooms, to determine if it needs a new category or different placement
|
* tracked rooms, to determine if it needs a new category or different placement
|
||||||
|
@ -74,6 +76,7 @@ export class ImportanceAlgorithm extends OrderingAlgorithm {
|
||||||
// noinspection JSMethodCanBeStatic
|
// noinspection JSMethodCanBeStatic
|
||||||
private categorizeRooms(rooms: Room[]): ICategorizedRoomMap {
|
private categorizeRooms(rooms: Room[]): ICategorizedRoomMap {
|
||||||
const map: ICategorizedRoomMap = {
|
const map: ICategorizedRoomMap = {
|
||||||
|
[NotificationColor.Unsent]: [],
|
||||||
[NotificationColor.Red]: [],
|
[NotificationColor.Red]: [],
|
||||||
[NotificationColor.Grey]: [],
|
[NotificationColor.Grey]: [],
|
||||||
[NotificationColor.Bold]: [],
|
[NotificationColor.Bold]: [],
|
||||||
|
|
Loading…
Reference in New Issue