mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 11:36:24 +01:00
Merge pull request #249 from vector-im/bwindels/ui-sent-status
show message already as black when sent but no remote echo yet
This commit is contained in:
commit
961d0cb224
@ -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