mattermost-mobile/app/utils
Jason Frerich 17f6aee8a5
[Gekidou MM-44927] Add Recent Searches Component (#6454)
* initial check in

* add search value to memoized dependencies in modifier component

* ignore the back press

* UI adjustments from PR feedback

* initial commit

* recent search are getting rendered from WDB

* search terms from the search bar are getting added

* can delete recent searches from WDB from recent searches Options

* will now add new ters to the table and recreate existing terms with new
timestamp

* push for scrollview

* use flatlist instead of scrolview

* s/deleteRecentTeamSearchById/removeSearchFromTeamSearchHistory/

* s/addRecentTeamSearch/addSearchToTeamSearchHistory/

* Fix search to use a flatlist and remove douplicate reference

* fix eslint

* Fix android autoscroll search field to the top

* limit the number of saved searches to 20 for a team.
return the results a team Search History sorted by createdAt

* set display to term for now

* clean up

* clean up

* extract as constant

* move styles to the top

* always update the created_at value in the database.

* remove unused function

* - remove useMemo of recent
- set or remove props on AnimatedFlatlist

* styling adjustments

* styling changes

* divider takes up 1ox so only need 15px margin to get the 16px total to
the neighboring veritcal views

* update compassIcon to match figma design

* update divider opacity to match figma design

* update styling from UX PR requests

* increase close button to touchable area of 40x40 and adjust menuitem
container

* use logError instead of console.log and trowing an error

* remove surrounding parenthesis

* There is only one record, so no need to batch.  Just call
destroyPermanently.

* call destroyPermanently directly

* when not useing the onScroll callback you don't need to set the
scrollEventThrottle

* set the max searches saved to 15

* no need to memoize

* shoud be a function call

* batch the add/update with the delete of the oldest model

* Minor improvements

* Fix bug when hitting back on search screen

* Fix long channel names in search results

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-14 14:56:08 +02:00
..
channel Fix links to channels closing the channel (#6446) 2022-06-30 11:13:28 -04:00
document [Gekidou] post component tree and partial postList (#5637) 2021-09-06 08:22:55 -03:00
draft [Gekidou MM-39729] Websocket Events - Groups (#5930) 2022-03-01 10:13:45 -06:00
emoji [Gekidou] Update Markdown theme (#6328) 2022-06-01 17:05:25 -04:00
file [Gekidou MM-44927] Add Recent Searches Component (#6454) 2022-07-14 14:56:08 +02:00
gallery [Gekidou] Markdown and Touchables (#6047) 2022-03-14 16:32:06 -03:00
general [Gekidou] Gallery (#6008) 2022-03-01 13:55:44 -03:00
images [Gekidou] Markdown SVG & image size support (#6032) 2022-03-10 09:03:09 -03:00
markdown [Gekidou] Groups mentions / highlights in messages (posts) (#6338) 2022-06-29 07:47:37 +10:00
navigation [Gekidou] channel quick actions (#6288) 2022-05-19 14:30:55 -04:00
notification Try to remove as many as as possible (#6200) 2022-05-12 15:46:11 +02:00
permalink Fix permalink to not joined channels and to not fetched posts. (#6294) 2022-06-17 19:23:12 +02:00
post Add column last_fetched_at to MyChannel & Thread tables and the migration (#6433) 2022-06-29 13:28:50 -04:00
post_list Properly handle deleted system posts (#6297) 2022-05-20 13:12:22 +02:00
role [Gekidou] Add performance and code improvements around post_list (#6113) 2022-04-04 08:14:55 -04:00
search [Gekidou - MM-44930] Use File component for showing files in search. (#6425) 2022-07-14 12:50:05 +02:00
server Fix theming and navigation stack tracking (#6443) 2022-06-30 11:14:07 -04:00
snack_bar [Gekidou] channel quick actions (#6288) 2022-05-19 14:30:55 -04:00
svg Gekidou MultiServers second part (#5963) 2022-02-17 10:42:06 -03:00
tap MM-36721 - [GEKIDOU] Porting Markdown components (#5586) 2021-08-02 20:30:17 +04:00
theme Fix theming and navigation stack tracking (#6443) 2022-06-30 11:14:07 -04:00
thread CRT fixes for MM-44210 & MM-44156 (#6295) 2022-05-20 06:28:12 +05:30
url [Gekidou] Performance & UI fixes (#6122) 2022-04-04 17:09:26 -04:00
user Do not show expired custom status in userItem (#6439) 2022-06-30 11:13:14 -04:00
apps.ts Add AppsForm and Interactive Dialogs (#6142) 2022-04-28 18:26:21 +02:00
buttonStyles.ts [Gekidou] Add empty unreads placeholder (#6350) 2022-06-06 15:03:29 -04:00
categories.ts [Gekidou] channel quick actions (#6288) 2022-05-19 14:30:55 -04:00
client_error.ts Draft - Add Server Screen Gekidou Updates (#5663) 2021-10-29 19:14:55 -03:00
datetime.ts Gekidou CRT - Global threads screen (#6140) 2022-04-28 09:01:36 -04:00
error_handling.ts Substitute all console.x by an appropiate log util function (#6427) 2022-06-24 10:26:40 -04:00
font_family.ts fixed OpenSans, added Metropolis fonts & modified post text styles (#5728) 2021-10-07 17:20:39 -03:00
groups.ts [Gekidou] Groups + group-memberships deferred fetch (#6370) 2022-07-07 12:20:06 +02:00
helpers.ts bottomSheet snapPoint helper (#6169) 2022-04-13 10:11:31 -04:00
integrations.ts Try to remove as many as as possible (#6200) 2022-05-12 15:46:11 +02:00
key_mirror.ts MM-35115 [Gekidou] Login flow - Email and Password (#5402) 2021-06-18 00:57:40 -04:00
log.ts Substitute all console.x by an appropiate log util function (#6427) 2022-06-24 10:26:40 -04:00
mattermost_managed.ts Substitute all console.x by an appropiate log util function (#6427) 2022-06-24 10:26:40 -04:00
message_attachment_colors.ts Try to remove as many as as possible (#6200) 2022-05-12 15:46:11 +02:00
mix.ts MM-30482 [Gekidou] Data Operator (#5346) 2021-04-22 19:16:00 +04:00
opengraph.ts [Gekidou] post component tree and partial postList (#5637) 2021-09-06 08:22:55 -03:00
push_proxy.ts [Gekidou] [MM-41837] Add verification for push proxy and related interface (#6192) 2022-05-09 11:41:16 +02:00
security.ts Integrate react-native-network-client (#5499) 2021-07-06 11:16:35 -04:00
sentry.ts Substitute all console.x by an appropiate log util function (#6427) 2022-06-24 10:26:40 -04:00
timezone.ts [Gekidou] db manager database getters (#6377) 2022-06-13 18:32:47 -04:00
typography.ts Draft - Add Server Screen Gekidou Updates (#5663) 2021-10-29 19:14:55 -03:00