forked from coracle/flotilla
Improve group membership detection
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte"
|
||||
import ChannelName from "@app/components/ChannelName.svelte"
|
||||
import {makeRoomPath} from "@app/routes"
|
||||
import {deriveChannel, channelIsLocked} from "@app/state"
|
||||
import {deriveChannel} from "@app/state"
|
||||
import {notifications} from "@app/notifications"
|
||||
|
||||
interface Props {
|
||||
@@ -23,7 +23,7 @@
|
||||
href={path}
|
||||
{replaceState}
|
||||
notification={notify ? $notifications.has(path) : false}>
|
||||
{#if channelIsLocked($channel)}
|
||||
{#if $channel?.closed || $channel?.private}
|
||||
<Icon icon="lock" size={4} />
|
||||
{:else}
|
||||
<Icon icon="hashtag" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import {goto} from "$app/navigation"
|
||||
import {randomId} from "@welshman/lib"
|
||||
import {displayRelayUrl} from "@welshman/util"
|
||||
import {deriveRelay} from "@welshman/app"
|
||||
import {deriveRelay, getThunkError} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
@@ -11,7 +11,7 @@
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {hasNip29, loadChannel} from "@app/state"
|
||||
import {addRoomMembership, createRoom, editRoom, joinRoom, getThunkError} from "@app/commands"
|
||||
import {createRoom, editRoom, joinRoom} from "@app/commands"
|
||||
import {makeSpacePath} from "@app/routes"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
await loadChannel(url, room)
|
||||
|
||||
addRoomMembership(url, room, name)
|
||||
goto(makeSpacePath(url, room))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user