mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
fix lint
This commit is contained in:
parent
6bdbbee83e
commit
75ee509361
@ -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 {
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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
|
||||
);
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
@ -40,4 +40,4 @@ class ReactionView extends TemplateView {
|
||||
onClick() {
|
||||
this.value.toggleReaction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user