mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
show message already as black when sent but no remote echo yet
This commit is contained in:
parent
5b14d14286
commit
856001160b
@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
import {UpdateAction} from "../UpdateAction.js";
|
||||
import {ViewModel} from "../../../../ViewModel.js";
|
||||
import {SendStatus} from "../../../../../matrix/room/sending/PendingEvent.js";
|
||||
|
||||
export class SimpleTile extends ViewModel {
|
||||
constructor(options) {
|
||||
@ -47,6 +48,10 @@ export class SimpleTile extends ViewModel {
|
||||
return this._entry.isPending;
|
||||
}
|
||||
|
||||
get isUnsent() {
|
||||
return this._entry.isPending && this._entry.status !== SendStatus.Sent;
|
||||
}
|
||||
|
||||
abortSending() {
|
||||
this._entry.pendingEvent?.abort();
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ a {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.TextMessageView.pending .message-container {
|
||||
.TextMessageView.unsent .message-container {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
|
@ -624,7 +624,7 @@ only loads when the top comes into view*/
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
.TextMessageView.pending .message-container {
|
||||
.TextMessageView.unsent .message-container {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ export function renderMessage(t, vm, children) {
|
||||
const classes = {
|
||||
"TextMessageView": true,
|
||||
own: vm.isOwn,
|
||||
pending: vm.isPending,
|
||||
unsent: vm.isUnsent,
|
||||
unverified: vm.isUnverified,
|
||||
continuation: vm => vm.isContinuation,
|
||||
messageStatus: vm => vm.shape === "message-status" || vm.shape === "missing-attachment" || vm.shape === "file",
|
||||
|
Loading…
Reference in New Issue
Block a user