Open NicolasBuquet opened 1 year ago
Spaces displaying is conditioned by a few flags :
SHOW_SPACES
in im/vector/app/config (set tot False)SPACES_SHOW_ALL_IN_HOME
in im/vector/app/config (set to !SHOW_SPACES)prefSpacesShowAllRoomInHome()
in im/vector/app/features/settings (returns user defined pref or Config.SPACES_SHOW_ALL_IN_HOME
if no user pref defined as in Tchap actually)Setting `SHOW_SPACES' to True activate the Spaces button on the home list.
When displaying TimelineView coming from a notification, if Spaces are not unified (prefSpacesShowAllRoomInHome
is false), the application will try to activate the space related to the room notification if no space is already activated.
Cf. im/vector/app/features/home/room/detail/TimelineVIewModel
method intiSafe()
// We are coming from a notification, try to switch to the most relevant space
// so that when hitting back the room will appear in the list
When displaying unread messages, if prefSpacesShowAllRoomInHome
is false, it will filter orphans rooms (rooms that are no longer in any space). (cf. im/vector/app/features/home
method init()
)
When the setting is exposed in Settings, it will restart the activity if the value of SETTINGS_PREF_SPACE_SHOW_ALL_ROOM_IN_HOME
is toggled. (cf. im/vector/app/features/settingsmethod
bindPrefs()`)
And when displaying the room list, if prefSpacesShowAllRoomInHome
is false, it will display only orphans rooms if no space is actually selected. (cf. im/vector/app/features/home/room/listproperty
roomListSectionBuilder`)
The impact doesn't seem big. Some conscientious testing is needed of course.
Activation des Espaces sur Tchap Android :
L'activation des Espaces sur Tchap Android se fait par le biais du feature flag SHOW_SPACES
.
Il faut aussi remettre le panneau de présentation.
Une fois activé, l'option activée, un nouveau bouton flottant apparait au dessus du bouton de création de message :
Bouton "Espaces"
Au clic, si aucun espace n'est disponible, un menu propose la création d'un espace :
Menu création d'espaces
Cela s'enchaîne par la création d'un salon
Une fois un salon créé le menu permet de basculer d'un salon à l'autre :
Spaces will be activated on web client. Study possible impact on mobile client. Is it worth activating button "Change space"?