rename MessageTile to BaseMessageTile
since MessageTile doesn't have a shape property anymore
This commit is contained in:
parent
67714040e7
commit
ce976226f9
6 changed files with 11 additions and 11 deletions
|
@ -15,12 +15,12 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {MessageTile} from "./MessageTile.js";
|
||||
import {BaseMessageTile} from "./BaseMessageTile.js";
|
||||
import {SendStatus} from "../../../../../matrix/room/sending/PendingEvent.js";
|
||||
const MAX_HEIGHT = 300;
|
||||
const MAX_WIDTH = 400;
|
||||
|
||||
export class BaseMediaTile extends MessageTile {
|
||||
export class BaseMediaTile extends BaseMessageTile {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
this._decryptedThumbnail = null;
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
import {SimpleTile} from "./SimpleTile.js";
|
||||
import {getIdentifierColorNumber, avatarInitials, getAvatarHttpUrl} from "../../../../avatar.js";
|
||||
|
||||
export class MessageTile extends SimpleTile {
|
||||
export class BaseMessageTile extends SimpleTile {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
this._isOwn = this._entry.sender === options.ownUserId;
|
||||
|
@ -85,7 +85,7 @@ export class MessageTile extends SimpleTile {
|
|||
updatePreviousSibling(prev) {
|
||||
super.updatePreviousSibling(prev);
|
||||
let isContinuation = false;
|
||||
if (prev && prev instanceof MessageTile && prev.sender === this.sender) {
|
||||
if (prev && prev instanceof BaseMessageTile && prev.sender === this.sender) {
|
||||
// timestamp is null for pending events
|
||||
const myTimestamp = this._entry.timestamp || this.clock.now();
|
||||
const otherTimestamp = prev._entry.timestamp || this.clock.now();
|
|
@ -15,11 +15,11 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {MessageTile} from "./MessageTile.js";
|
||||
import {BaseMessageTile} from "./BaseMessageTile.js";
|
||||
import {formatSize} from "../../../../../utils/formatSize.js";
|
||||
import {SendStatus} from "../../../../../matrix/room/sending/PendingEvent.js";
|
||||
|
||||
export class FileTile extends MessageTile {
|
||||
export class FileTile extends BaseMessageTile {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
this._downloadError = null;
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {MessageTile} from "./MessageTile.js";
|
||||
import {BaseMessageTile} from "./BaseMessageTile.js";
|
||||
|
||||
/*
|
||||
map urls:
|
||||
|
@ -23,7 +23,7 @@ android: https://developers.google.com/maps/documentation/urls/guide
|
|||
wp: maps:49.275267 -122.988617
|
||||
https://www.habaneroconsulting.com/stories/insights/2011/opening-native-map-apps-from-the-mobile-browser
|
||||
*/
|
||||
export class LocationTile extends MessageTile {
|
||||
export class LocationTile extends BaseMessageTile {
|
||||
get mapsLink() {
|
||||
const geoUri = this._getContent().geo_uri;
|
||||
const [lat, long] = geoUri.split(":")[1].split(",");
|
||||
|
|
|
@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {MessageTile} from "./MessageTile.js";
|
||||
import {BaseMessageTile} from "./BaseMessageTile.js";
|
||||
|
||||
export class MissingAttachmentTile extends MessageTile {
|
||||
export class MissingAttachmentTile extends BaseMessageTile {
|
||||
get shape() {
|
||||
return "missing-attachment"
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ export class SimpleTile extends ViewModel {
|
|||
}
|
||||
|
||||
// don't show display name / avatar
|
||||
// probably only for MessageTiles of some sort?
|
||||
// probably only for BaseMessageTiles of some sort?
|
||||
get isContinuation() {
|
||||
return false;
|
||||
}
|
||||
|
|
Reference in a new issue