This commit is contained in:
Bruno Windels 2021-06-11 11:30:11 +02:00
parent 6bdbbee83e
commit 75ee509361
6 changed files with 6 additions and 12 deletions

View file

@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import {ViewModel} from "../../../ViewModel.js";
import {ObservableMap} from "../../../../observable/map/ObservableMap.js";
export class ReactionsViewModel {

View file

@ -28,7 +28,6 @@ import {EventEntry} from "./timeline/entries/EventEntry.js";
import {ObservedEventMap} from "./ObservedEventMap.js";
import {DecryptionSource} from "../e2ee/common.js";
import {ensureLogItem} from "../../logging/utils.js";
import {ANNOTATION_RELATION_TYPE, getRelation} from "./timeline/relations.js";
const EVENT_ENCRYPTED_TYPE = "m.room.encrypted";

View file

@ -22,7 +22,7 @@ import {TimelineReader} from "./persistence/TimelineReader.js";
import {PendingEventEntry} from "./entries/PendingEventEntry.js";
import {RoomMember} from "../members/RoomMember.js";
import {PowerLevels} from "./PowerLevels.js";
import {getRelationFromContent, getRelation, ANNOTATION_RELATION_TYPE} from "./relations.js";
import {getRelation, ANNOTATION_RELATION_TYPE} from "./relations.js";
import {REDACTION_TYPE} from "../common.js";
export class Timeline {
@ -158,7 +158,7 @@ export class Timeline {
// also look for a relation target to update with this redaction
if (pee.redactingRelation) {
const eventId = pee.redactingRelation.event_id;
const found = this._remoteEntries.findAndUpdate(
this._remoteEntries.findAndUpdate(
e => e.id === eventId,
updateOrFalse
);

View file

@ -16,7 +16,7 @@ limitations under the License.
import {BaseEntry} from "./BaseEntry.js";
import {REDACTION_TYPE} from "../../common.js";
import {createAnnotation, getRelationFromContent, ANNOTATION_RELATION_TYPE} from "../relations.js";
import {createAnnotation, ANNOTATION_RELATION_TYPE} from "../relations.js";
import {PendingAnnotations} from "../PendingAnnotations.js";
export class BaseEventEntry extends BaseEntry {

View file

@ -92,6 +92,7 @@ export class PendingEventEntry extends BaseEventEntry {
if (this._redactionTarget) {
return getRelationFromContent(this._redactionTarget.content);
}
return null;
}
/**
* returns either the relationship on this entry,
@ -105,9 +106,4 @@ export class PendingEventEntry extends BaseEventEntry {
return getRelationFromContent(this._pendingEvent.content);
}
}
getOwnAnnotationId(_, key) {
// TODO: implement this once local reactions are implemented
return null;
}
}

View file

@ -23,7 +23,7 @@ export class ReactionsView extends ListView {
className: "Timeline_messageReactions",
tagName: "div",
list: reactionsViewModel.reactions,
onItemClick: (reactionView, evt) => reactionView.onClick(),
onItemClick: reactionView => reactionView.onClick(),
}
super(options, reactionVM => new ReactionView(reactionVM));
}