Fixes#10523
The problem was that the CreateChatView now uses an isolated Chat RootStore, since we can't be sure if the personal chat section will be loaded yet.
To fix that, I created a new store that is only for storing the properties needed for that new chat. That way we are sure that it is created and shared to necessary components.
- CommunitiesPortalLayout was the last piece still unconditionally loaded
on startup -> fixed
- extract the `communitiesStore` into AppMain to be able to reuse it from
other components
- move the import/create community dialogs to `Popups` (reusability)
- cleanup and remove some dead code, fix warnings
Iterates #6204
There's a bug that all requests to join a community require the user to
authenticate themselves. This should only be needed for community that
are token permissioned.
This commit fixes it by only performing auth when requesting from the
tokengated community view.
Fixes#10010
Users that request access to community that are token permissioned
need to authenticate and enter their password, so they can reveal
their wallet addresses
Also add handlers to JoinCommunityView for requesting and cancelling
requests. These will be extended in follow up commits to included
authentication modals
- Refactored minting components store access, since some panels were accessing stores directly. Now `CommunitySettingsView` is the single place where stores are accessed.
- Renamed store `CommunitesStore` to `CommunityTokensStore` for handling minting / airdrop actions / request models.
- `NetworkFilter` refactored to prevent direct access to store inside the component.
Closes#9663
This does a few things:
- It integrates with the latest `CommunityTokensMetadata` to access
community specific ERC721 token
- It changes `ChatLayout` such that it conditionally loads either
`ChatView` or `JoinCommunityView`. `JoinCommunityView` has been
specifically designed for token-gated communities
Here's what works (in terms of token permissions):
1. If a community has token permissions and the the current users is not
a member of that community, we show `JoinCommunityView` instead of
`ChatView`
2. Any community token permissions of type "Become member" are listed in
the `JoinCommunityView`
3. There are different types of token critera a permission can have:
ERC20 token, ERC721 token, or ENS (which is also ERC721 but we have
a type for that nonetheless)
Only ERC20 token balances are checked for the known wallet accounts.
This happens every time the known token list has been updated (every
10 min atm).
We still need to add balance checks for any ERC721 tokens and ENS.
4. If token permissions are created, updated or deleted by the community
owner, the `JoinCommunityView` will update in real-time.
You'll also notice that the `Reveal my address and request access`
button will be enabled if any of the token permissions are fulfilled
(only ERC20 at the time being). Clicking that button will not yet send
a request.
This will be done in the next step as part of https://github.com/status-im/status-desktop/issues/9761
Prior to this change `ChatLayout` exposed `chatView` which let other
components access it, its properties and signals.
This is problematic as we need to be able to swap out the `ChatView`
with the `JoinCommunityView` for token gated communities, in which case
there won't be an instance of `chatView`.
This commit ensures that we rely purely on inputs and outputs of the
component, without exposing the component instance itself.
... doesn't work in the community section
Extract the `Chat.RootStore` as a toplevel/shared property and pass it
down to ChatLayouts, instead of cross referencing it between different
components. This was also problematic since the ChatLayouts now live
inside a Loader, so it's more appropriate to refer to the
`Chat.RootStore` directly, instead of
`personalChatLayoutLoader.item.rootStore`, since the
`personalChatLayoutLoader.item` might not be visible (due to it being
inside a Loader and a StackLayout) or it might even be a different
component (`loadingStateComponent` or `errorStateComponent`).
This also caused similar problems for other components, such as
ActivityCenterPopup or StatusStickersPopup.
Fixes#9513
- all remaining global popup components moved into a separate Popups
entity
- removed some static objects from the Global singleton (appMain,
pinnedMessagesPopup, communityProfilePopup, sounds); rationale:
singletons should not contain any state
- fixed support for popups in storybook
- fixed some warnings (most of them broke the popups in one way or the other)
Don't show members in public chat
Show members in communities by default
Enable Gif Widget by default and remove settings entry
Enable Online users by default and remove settings entry
fixes#4906
- admin flag exposed to qml for chat/channel
- `CreateChannelPopup` updated
- `createPopup` function added to the `Global` singleton
- `PinnedMessagesPopup` component moved to `AppMain` and shared
among components beneath
- `chatType` added to `Constants` to group chat type related values
- `messageContentType` added to `Constants` to group message content type related
values
- `MessageStore` maintained per message list now
- added new `ChatContentView` component used to display chat/channel content
- components updated to display messages from the new backend
- `StatusChatToolBar` appropriately updated
- mute/unmute feature added to chat/channel list as well as to `StatusChatToolBar`
Changes done on the backend side related to the new chat/channel/categories model
are applied here. Necessary changes done on the `statusq` may be seen in PR-486.
Parts of the code which are not refactored yet are commented out.
Displayed chats/categories/channels since now are using refactored backend.
Changes done on the backend side related to the new chat/channel/categories model
are applied here. Necessary changes done on the `statusq` may be seen in PR-486.
Parts of the code which are not refactored yet are commented out.
Displayed chats/categories/channels since now are using refactored backend.