implement uniform sorting on all views

This commit is contained in:
marlon-erler
2024-07-19 15:13:43 +02:00
parent 0704ca9e5b
commit 6990b5edc5
13 changed files with 157 additions and 102 deletions
+7 -2
View File
@@ -4,13 +4,14 @@ import {
Chat,
MessageObject,
MessageObjectContent,
MessageObjectWithIndex,
} from "../../Model/chatModel";
import { icons } from "../../icons";
export function ObjectEntryView(
chat: Chat,
messageObject: MessageObject,
messageObject: MessageObjectWithIndex,
selectedObject: React.State<MessageObject | undefined>,
isShowingObjectModal: React.State<boolean>
) {
@@ -54,7 +55,7 @@ export function ObjectEntryView(
);
});
return (
const view = (
<button
class="tile flex-no"
on:click={select}
@@ -73,4 +74,8 @@ export function ObjectEntryView(
</div>
</button>
);
messageObject.index.subscribe(newIndex => {
view.style.order = newIndex;
})
return view;
}