MM-41748 Gekidou Post Options Queries (#5972)

* skeleton in place

* fix ts error

* creating base option component

* Added all options except reaction

* moved options under /component/options

* added destructive styling

* skeleton - need polishing now

* default emojis for quick reaction

* rename files and small refactor

* Properly close bottom sheet

* redid reaction component

* canSave, isSaved

* canAddReaction condition

* fix aligment

* code clean up

* fix opening on tablet

* undo comment on local reaction action

* undo needless formatting

* clean up comment

* shows selected reaction

* fix marginTop and added title for Tablet

* code clean up

* investigating navigation

* fixed navigation

* Post options bottomSheet and renamed DrawerItem to MenuItem

* renamed optionType to testID

* update navigation_close_modal to close_bottom

* removed context in favor of Pressable

* Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* removed theme prop from PickReaction

* en.json and code fixes

* removed post_options from screen/index

* removed post_options from screens constant

* Revert "removed post_options from screen/index"

This reverts commit 24caa9773f.

* Revert "removed post_options from screens constant"

This reverts commit 863e2faaf7.

* fix theme import

* remove useless margin

* disabled post_options

* queries - work in progress

* queries - work in progress

* queries - work in progress

* minor fix

* queries - work in progress

* queries - work in progress

* queries - work in progress

* queries - work in progress

* queries - work in progress

* fix query

* queries - work in progress

* reaction query fixed

* queries - work in progress

* queries - canReaction option

* queries - canDelete option

* queries - canReply option

* queries - canPin, canSave, canCopyPermalink option

* queries - options - wip

* queries - options - wip

* queries - options - wip

* fix location

* removed logs

* undo post_draft changes

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Avinash Lingaloo
2022-02-16 14:21:27 +04:00
committed by GitHub
parent df5c780337
commit ea54a8dff3
7 changed files with 162 additions and 51 deletions

View File

@@ -101,7 +101,7 @@ const withPost = withObservables(
const canDelete = from$(hasPermissionForPost(post, currentUser, isOwner ? Permissions.DELETE_POST : Permissions.DELETE_OTHERS_POSTS, false));
const isEphemeral = of$(isPostEphemeral(post));
const isFlagged = database.get<PreferenceModel>(PREFERENCE).query(
Q.where('category', Preferences.CATEGORY_FLAGGED_POST),
Q.where('category', Preferences.CATEGORY_SAVED_POST),
Q.where('name', post.id),
).observe().pipe(switchMap((pref) => of$(Boolean(pref.length))));

View File

@@ -165,8 +165,7 @@ const Post = ({
}
Keyboard.dismiss();
const passProps = {location, post};
const passProps = {location, post, showAddReaction};
const title = isTablet ? intl.formatMessage({id: 'post.options.title', defaultMessage: 'Options'}) : '';
if (isTablet) {