Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS isOpen() always returns true #417

Open
SvenSonnborn opened this issue Feb 18, 2025 · 0 comments
Open

iOS isOpen() always returns true #417

SvenSonnborn opened this issue Feb 18, 2025 · 0 comments

Comments

@SvenSonnborn
Copy link

SvenSonnborn commented Feb 18, 2025

sheet:


const OptionSheet: FC<SheetProps<'option-sheet'>> = ...
...
<ActionSheet
      id={props.sheetId}
      onClose={() => {
        console.log('closed');
      }}
      onOpen={() => {
        console.log('opened');
      }}
    >
      <View style={styles.container}>
        <AlertModal
          message={t('main.watch.deleteVideoQuestion')}
          title={t('main.watch.deleteVideoTitle')}
          visible={isDeleteAlertVisible}
          onCancel={() => setIsDeleteAlertVisible(false)}
          onConfirm={handleDeleteConfirm}
        />

        <AlertModal
          message={t('main.watch.deleteVideoQuestion')}
          title={t('main.watch.deleteVideoPackageTitle')}
          visible={isDeleteVideoAlertVisible}
          onCancel={() => setIsDeleteVideoAlertVisible(false)}
          onConfirm={handleDeleteVideoConfirm}
        />

        <AlertModal
          message={t('main.watch.deleteVideosQuestion')}
          title={t('main.watch.deleteVideoPackageTitle')}
          visible={isBlockAlertVisible}
          onCancel={() => setIsBlockAlertVisible(false)}
          onConfirm={handleBlockConfirm}
        />
        <View style={styles.buttonContainer}>
          <ScrollView horizontal showsHorizontalScrollIndicator={false}>
            {!report ? (
              filteredOptions.map(item => (
                <OptionItem
                  isAutoScrollEnabled={isAutoScrollEnabled}
                  item={item as { title: string; icon: IconName | null }}
                  key={item.icon}
                  onDownload={handleDownload}
                  onDraftClick={onDraftClick}
                  onPeresEditVideo={(): void => {
                    dispatch(setPlayPauseHandler(undefined));
                    navigation.navigate('EditWatch', {
                      fromWatch: generateEditVideoConfig(getVideoPayload),
                      fromOptionSheet: true,
                    });
                    dispatch(setWatchDescription(getVideoPayload?.post_text));
                    hideSheets();
                  }}
                  onToggleAutoScroll={handleToggleAutoScroll}
                />
              ))
            ) : (
              <ReportField id={id ?? ''} setReport={setReport} />
            )}
          </ScrollView>
        </View>
        <View className="mb-5">
          <Animated.View className="justify-between" pointerEvents="box-none">
            <SuggestionUsers />
          </Animated.View>
        </View>
      </View>
    </ActionSheet>

When logging in another component the function always returns true as soon the sheet was opened once. Before the first opening it is undefined ( which is correct )
console.log('optionSheet', SheetManager.get('option-sheet').current?.isOpen?.());

The logs in my component even says opened and closed correctly when clicking on the backdrop.
The problem is only on iOS. Android works fine.

Version is: 0.9.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant