* Group autocomplete -
* Styling fixes
* Loading indicator
* Displays group name and display name
* PR Feedback
* Cleans up styling
* Adds constraints to group searches
* Channel Team before current team
* PR Feedback; displayName > name, model observable
* PR Feedback; rename fetch + model observable
* PR Feedback: return {error}, spelling fix
* PR Feedback: Add forceLogoutIfNecessary to fetch calls
* Remove doubled up logout
* Preparing thread data as well with prepareDeletePost
* observing the post directly to prevent the crash until the data issue is found
* mark as read, delete threeds fix
* Update thread.ts
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Add verification for push proxy and related interface
* Fix lint and extract i18n
* Be specific about undefined equalities.
* Fix test
* Address feedback
* Fix long server names styles
* Fix tests and typo
* Fixes
* Updated snapshot
* Excluding current user from getting updated
* Doesn't handle users if it's empty
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Display local results
* Fix queryPreferencesByCategoryAndName to observeWithColumns value
* Find channels (remote)
* ux feedback review
* dev review
* dev review 2
* Fetch deleted channels from other teams
* Add AppsForm and Interactive Dialogs
* Add the missing plumbing for Interactive Dialogs and minor fixes
* Remove widgets subfolder
* Fix paths
* Address feedback
* Address feedback
* i18n extract
* Only set the dialog if we are in the same server
* MM-40093: adds remote action to sync threads
Syncing threads fetches all unread threads if there are no threads in
the DB.
If there are threads in the DB it fetches all threads newest than the
newest one we have stored.
Fetching happens in batches of 60 threads at a time.
* Fixes querying for all threads list
* Syncs threads on WS reconnection
* Addresses review comments
* Addresses review comments
* WS Events, Actions, Queries, Thread Follow, Post Query
* i18n changes
* Misc
* Only unread threads are marked as read
* Mark threads from WS even as visible in Global threads
* Merge fixes
* Update thread_post_list.tsx
* Merge fix
* Feedback fix
* Make teamId in handleThreads optional for unfollowed threads
* Removed unwated type and return
* Review changes
* Removing unused model
* Merge fix
* Misc fixes
* Following button query change
* copy directly from v1. will get working and then convert class to functional components
* screen showing up correctly. Need to convert lifestyle methods
* create channel button working
* save before refactor in prep for bringing in edit_channel functionality
* change function naming
* clean up lint
* clean up for PR review
* clean up for PR review
* remove hoardcoded styles
* add edit_channel screen
* add handlePatchChannel
* add custom useFormInput hook. use edit screen for both create and edit screens. edit or create screen mode determined by channel prop passed in as a channel or null
* rename edit_channel to create_or_edit_channel
* displayname, header, and purpose are now an object with value and onChange props, created from the useFormInput hook. Now only need to pass this new FormInput Prop to the edit_channel_info component and deconstruct there to get the onChange and value
* fix some lint errors
* fix some lint errors
* remove empty line
* pass intl into utils validate functions because they are not Hooks. add validation for displayName including translations.
* Move useFormInput hook to its own hooks file and import
* simplify
* remove editing prop. Was used to determine if the right button was enabled. It was always true for edit_channel screen and always false for create channel screen. The enableRightButton prop call back is was also used for the same reason.
* remove channeUrl editing references. This was not implemented on v1
* pass editing prop back into component and add back logic. When editing one field must change. when creating, just need to check that name is provided
* lint fixes
* fix typing issue for channel types
* scrolling ref should be fixed. Linting should pass now
* Linting should pass now
* require id field in partial Channel. fixes tsc
* remove everything related to renaming the channel URL. This has never been requred for mobile
* manage state with useReducer so that all actions/state in one location. This also removes the number of onXXX functions and reduces the number of functions in the component
* reorganize code. useEffects are at top. Move type and interfaces outside of function component
* Fix lint
* nit: invert if statement checking a negative
* use cneterChannelColor. in figma this is center channel text, but I verified theme color by comparing to SSO login text color
* Simple snapshot tests as a start
* Add more tests
* update snapshot
* add snapshot tests. Add tests for button enabling and disabling
* simplify test with destructuring.
* PR feedback. formatting changes. get user and teamid from one call
* remove FormInput hook and use value/setvalue convention for controlled components
* no need to setChannelDisplayName after creating/updating channel
* Just pass the setXXX function. Don't need to create as separate callback
* modify floatingTextInput component to allow placeholder text
* remove InteractionManager. PR nits
* mv EditChannelComponent into create_or_edit screen. Rename component from EditChannelInfo to ChannelInfoForm
* correct import path
* add IntlShape Type to function input. Wrap screen with withServerDatabase, not withIntl
* remove state setting function calls from inside the reducer. move close function outside of the component. remove setRightButton and rightButton and place rightbutton in initial appState
* move editing const after useX oneliners and before useCallback, useEffect, and useReducers
* rightButton
- useMemo to memoize an object with dependencies
- move out of the appState
emitCanSaveChannel
- wrap with useCallback
onCreateChannel
- wrap with useCallback
onUpdateChannel
- wrap with useCallback
useEffect Navigation
- use the callbacks as dependencies in stead of the depencies of those
callbacks.
* wrap all formatted message with useMemo()
wrap all onXXXChangeText with useCallback and add deps
move all oneliner derived constants directly after useState useMemo
* remove useMemo from formatted text
* switchToCHannel is still not working. failing at
const channel: ChannelModel = await member.channel.fetch();
* use prepareMyChannelsForTeam to update db tables for new channel
* add placeholder text color
* Attach open edit channel screen to `Set Header` button in channel intro view
port SectionItem from V1 and us to add a Switch for setting private/public channel
hook up the plus icon in the channel list header to create a channel (temporary fix to allow debugging)
add new queryChannelsInfoById and queryCurrentChannelInfo query functions
update text for create screen text inputs
* Fix styles and fix actions
* Add autocomplete, fix patch, and address design feedback
* Address feedback
* Add margin between icon and label on Make Private
* Address feedback
* Address feedback
* Address feedback and fix channel list not updating when the channel gets created
* Address feedback and directly add the channel to the default category
* Render at-mentions as Members if no channelId is set
* Display autocomplete on iOS
Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Extract common observers to queries
* Separate also queries and more agressive refactoring
* Use query to avoid throws from findAndObserve
* Fix minor error
* Address feedback
* Address feedback
* Address feedback
* Fix model types
* Address feedback
* Add User Mention to autocomplete
* Minor fixes
* Fix at_mention (you) alignment
* Add missing translation strings
* Make it more parallel to channel mentions
* Fix bot tag
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* MM-39710: saved posts screen and DB
- Adds ids of saved posts to the systems table, as we do with recent
mentions.
- Adds a new remote action to fetch saved posts (getFlaggedPosts).
- Adds a new screen to display those in a mobile.
- Displays saved posts in the tablet view next to profile card.
* Uses Preferences instead of System table
Renames to saved posts wherever possible
* Adds text to localization file
* Fixes fetching/saving saved posts
* Refactor mini post to components folder
* Fixes hooks dependencies according to review
* Removes unnecessary 'withObservables'
* Small refactor
* Satisfies linter
* Adds empty state
And fixes empty state icon to be theme sensitive.
Both recent_mentions and saved_posts.
* Fixes empty screen's alignment
* Add missing preference
* add missing translation strings
* remove unused database type definition
* Fetch newly saved post
* Fix return type for client.getSavedPosts
* Remove usage of lodash compose
* Rename get remote actions to fetch
* Include close button for savedPost modal
* fix tablet view for SavePosts and use lottie loading indicator
* Render post with content for save posts and recent mentions
* post list viewable items type definition
* Add layout width to post content for saved post screen
* Use PostWithChannel and viewableItems for saved posts and recent mentions
* Layout margin of 20
* openGraphImage margin
* Fix openGraphImage display
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Gallery screen (ground work)
* Open the gallery from posts
* Open the gallery from post draft
* feedback review
* Feedback review 2
* do not remove dm channel names and localization fix
* update to the latest network-client
* do not override file width, height and imageThumbail if received file does not have it set
* bring back ScrollView wrapper for message component
* Remove Text wrapper for markdown paragraph
* Fix YouTube play icon placeholder
* Make video file play button container round
* Add gif image placeholder
* Save images & videos to camera roll
* Feedback review 3
* load video thumbnail when post is in viewport
* simplify prefix
* Servers logout and websocket state
* addNewServer uility and rename file
* add LaunchType for add new server
* added time to LaunchProps type
* Remove unnecessary props for launchToHome
* Fix local action updateLastPostAt
* Batch fetchProfilesPerChannels requests in chunks of 50
* WS handleUserAddedToChannelEvent to return early if no channelId is set
* WS handleNewPostEvent to batch update last_post_at
* add common actions to sync other servers
* Entry actions to sync other servers data
* Do not attempt to fetch notification data if payload does not contain a channelId
* Set database as default at the end of the login flow
* Handle logout when other servers remain
* Handle Server options
* Show alert when logging out from the account screen
* Add workaround to have Lottie animate the loading component
* Fix badge position in ServerIcon component
* Server screen to support adding new server
* Fix login screen to display error when credentials do not match
* add localization strings
* fix DatabaseProvider to update on server switch
* Fix home icon and server icon subscriptions and badge display
* Add dependencies to onLogout callback
* feedback
* Only updateLastPostAt if needed
* Add Channel Browser screen
* Fix tests
* Fix lint
* Address feedback
* Fix test
* Remove cancel and fix bottom sheet size
* Address feedback
* Address feedback
* Keep loading when not many items are visible.
* Separate search_handler from browse channels
* Search channels directly instead of filtering from the loaded
* Address feeback
* Reduce the size of search_handler.tsx
* Add title and closeButtonId to bottomSheet
* Let the default value be public and set it before the if
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Fix & small refactor to the app entry logic and WS reconnection
* Remove not needed log in MainActivity
* Replace async forEach with for await
* extract getClient to its own block
* replace double filter with reduce
* fix select channel on WS reconnect and user no longer belongs to current team
* feedback review on WS users actions
* Add windowFocusChanged for Android only
* on WS reconnection set team & channel if not member of current team
* reduce suggestion
* feedback review
* Initial commit post input
* Fix message posting, add create direct channel and minor fixes
* Fix "is typing" and "react to last post" behaviour
* Some reordering, better handling of upload error, properly clear draft on send message, and fix minor progress bar misbehavior
* Add keyboard listener for shift-enter, add selection between video or photo while attaching, add alert when trying to attach more than you are allowed, add paste functionality, minor fixes and reordering
* Add library patch
* Fix lint
* Address feedback
* Address feedback
* Add missing negation
* Check for group name and fix typo on draft comparisons
* Address feedback
* Address feedback
* Address feedback
* Address feedback
* Fix several bugs
* Remove @app imports
* Address feedback
* fix post list & post draft layout on iOS
* Fix post draft cursor position
* Fix file upload route
* Allow to pick multiple images using the image picker
* accurately get the channel member count
* remove android cursor workaround
* Remove local const INPUT_LINE_HEIGHT
* move getPlaceHolder out of the component
* use substring instead of legacy substr for hardward keyboard
* Move onAppStateChange above the effects
* Fix camera action bottom sheet
* no need to memo SendButton
* properly use memberCount in sender handler
* Refactor how to get memberCount
* Fix queryRecentPostsInThread
* Remove unused isDirectChannelVisible && isGroupChannelVisible util functions
* rename errorBadUser to errorUnkownUser
* extract localized strings
* use ClientErrorProps instead of ClientError
* Minor improvements
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* [Gekidou]: MM-39757 - Recent mentions
* Refactor channel_info to a separate component
* Fixes schema tests
* Fixes channel_info theme color
* Removes RECEIVED_MENTIONS table and model
Removes RECEIVED_MENTIONS table and model and saves recent_mentions in
the SYSTEM table under the recentMentions ID.
* Cleanup recent_mentions handler
* Adds i18n in recent_mentions screen
* Observe changes on the post messages
* Addresses review comments
* Batches records
* Addresses review comments
* Addresses review comments
* Addresses review comments
* Addresses review comments
* Fetches channels and users needed for mentions
Fetching mentions from all teams might result in missing info like user
profiles, and channels missing from the DB.
This commit fetches all missing users and channels.
* Adds empty state for recent mentions
* Prepares all missing models for channels
* Addresses review comments
* Fixes mention keys for recent mentions
User mention keys when asking for mentions should not include general
purpose ones, like @channel, @all, @here.
Fixes ActivityIndicator color in recent mentions screen.
* Removes top margin of mention message
* Addresses review comments
* Fixes group.name undefined
* Push notifications entry point
* Process android notification natively only if RN is not initialized
* Database changes to store local channel viewed_at
* EphemeralStore wait until screen removed
* Move schedule session notification to utility
* Fix channel remote & local actions + added actions for markChannelAsViewed & fetchMyChannel
* Add fetchMyTeam remote action
* Add dismissAllModalsAndPopToScreen to navigation
* Improve post list component & add app state to re-trigger queries
* Improve WS implementation
* Handle push notification events
* Fix postsInChannel since handler
* Handle in-app notifications
* Post list to listen to column changes
* Track selected bottom tab in ephemeral store
* add useIsTablet hook
* in-app notifications on tablets
* Rename groups in channel/team to group channel/team
* Redefine groups schema
* Groups action and operator
* Add group at mentions
* fix uni test
* Update types/database/models/servers/group.d.ts
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
* Login entry point
* feedback review
* sort imports
* Fix model relations
* Handle when no current team or current channel has been selected
* Fix MFA unit test
* update prepareCommonSystemValues arguments