FEATURE: Improving thread list item and header (#21749)

* Moved the settings cog from thread list to thread and
  put it in a new header component
* Remove thread original message component, no longer needed
  and the list item and thread indicator styles/content
  will be quite different
* Start adding content (unread indicator etc.) to the thread
  list item and changing structure to be more like designs
* Serialize the last thread reply when opening the thread index,
  show in list and update with message bus
This commit is contained in:
Martin Brennan
2023-05-29 09:11:55 +02:00
committed by GitHub
parent 8a9d3b3eed
commit 7a9514922b
45 changed files with 394 additions and 224 deletions

View File

@ -35,11 +35,19 @@ export default class ChatChannelsManager extends Service {
return Object.values(this._cached);
}
store(channelObject) {
let model = this.#findStale(channelObject.id);
store(channelObject, options = {}) {
let model;
if (!options.replace) {
model = this.#findStale(channelObject.id);
}
if (!model) {
model = ChatChannel.create(channelObject);
if (channelObject instanceof ChatChannel) {
model = channelObject;
} else {
model = ChatChannel.create(channelObject);
}
this.#cache(model);
}