From eeb9b4b2e3afe6b99c448cf729ecd795884a9243 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 16 Apr 2019 17:23:45 +0200 Subject: [PATCH] don't show re-join upon kicked when we know you can't --- src/components/views/rooms/RoomPreviewBar.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index cba33a3b0e..47dbd0c178 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -228,10 +228,16 @@ module.exports = React.createClass({ const {memberName, reason} = this._getKickOrBanInfo(); title = _t("You were kicked from this room by %(memberName)s", {memberName}); subTitle = _t("Reason: %(reason)s", {reason}); - primaryActionLabel = _t("Re-join"); - primaryActionHandler = this.props.onJoinClick; - secondaryActionLabel = _t("Forget this room"); - secondaryActionHandler = this.props.onForgetClick; + + if (this._joinRule() === "invite") { + primaryActionLabel = _t("Forget this room"); + primaryActionHandler = this.props.onForgetClick; + } else { + primaryActionLabel = _t("Re-join"); + primaryActionHandler = this.props.onJoinClick; + secondaryActionLabel = _t("Forget this room"); + secondaryActionHandler = this.props.onForgetClick; + } break; } case MessageCase.Banned: {