Revert "Turn previews on for DMs and ensure they get rendered"

This reverts commit b19ae3ac93.
This commit is contained in:
Travis Ralston 2020-07-14 12:49:29 -06:00
parent 9d094a793c
commit 945dab6b1f
2 changed files with 3 additions and 16 deletions

View file

@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { DefaultTagID, TagID } from "./models";
import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
import { TagID } from "./models";
const TILE_HEIGHT_PX = 44;
@ -27,7 +26,7 @@ interface ISerializedListLayout {
export class ListLayout {
private _n = 0;
private _previews: boolean | null = null;
private _previews = false;
private _collapsed = false;
constructor(public readonly tagId: TagID) {
@ -51,12 +50,7 @@ export class ListLayout {
}
public get showPreviews(): boolean {
if (!isNullOrUndefined(this._previews)) {
return this._previews;
}
// Turn it on for DMs by default, but not for other rooms
return this.tagId === DefaultTagID.DM;
return this._previews;
}
public set showPreviews(v: boolean) {