From 122b2441c991a941193769569c532d8b0e198904 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 4 May 2018 00:55:28 +0300 Subject: Add support for explicit ordering and limiting rooms shown under a tag Fixes #41 --- matrix/rooms/room.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'matrix/rooms') diff --git a/matrix/rooms/room.go b/matrix/rooms/room.go index 808eecb..40303be 100644 --- a/matrix/rooms/room.go +++ b/matrix/rooms/room.go @@ -39,8 +39,8 @@ const ( type RoomTag struct { // The name of the tag. Tag string - // The order of the tag. Smaller values are ordered higher. - Order float64 + // The order of the tag. + Order string } // Room represents a single Matrix room. @@ -118,7 +118,7 @@ func (room *Room) MarkRead() { func (room *Room) Tags() []RoomTag { if len(room.RawTags) == 0 { - return []RoomTag{{"", 0.5}} + return []RoomTag{{"", "0.5"}} } return room.RawTags } -- cgit v1.2.3