Fix default sorting mechanics for new room list
Fixes https://github.com/vector-im/riot-web/issues/14445pull/21833/head
							parent
							
								
									ea15725164
								
							
						
					
					
						commit
						9a3744ebb2
					
				|  | @ -30,7 +30,6 @@ import { TagWatcher } from "./TagWatcher"; | |||
| import RoomViewStore from "../RoomViewStore"; | ||||
| import { Algorithm, LIST_UPDATED_EVENT } from "./algorithms/Algorithm"; | ||||
| import { EffectiveMembership, getEffectiveMembership } from "./membership"; | ||||
| import { ListLayout } from "./ListLayout"; | ||||
| import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; | ||||
| import RoomListLayoutStore from "./RoomListLayoutStore"; | ||||
| import { MarkedExecution } from "../../utils/MarkedExecution"; | ||||
|  | @ -425,7 +424,8 @@ export class RoomListStore2 extends AsyncStore<ActionPayload> { | |||
| 
 | ||||
|     // logic must match calculateListOrder
 | ||||
|     private calculateTagSorting(tagId: TagID): SortAlgorithm { | ||||
|         const defaultSort = SortAlgorithm.Alphabetic; | ||||
|         const isDefaultRecent = tagId === DefaultTagID.Invite || tagId === DefaultTagID.DM; | ||||
|         const defaultSort = isDefaultRecent ? SortAlgorithm.Recent : SortAlgorithm.Alphabetic; | ||||
|         const settingAlphabetical = SettingsStore.getValue("RoomList.orderAlphabetically", null, true); | ||||
|         const definedSort = this.getTagSorting(tagId); | ||||
|         const storedSort = this.getStoredTagSorting(tagId); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Travis Ralston
						Travis Ralston