mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
mobile: fix tag suggestions in share widget (#2354)
This commit is contained in:
@@ -17,23 +17,22 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { FlashList } from "@shopify/flash-list";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Platform,
|
||||
StatusBar,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
useWindowDimensions,
|
||||
View
|
||||
View,
|
||||
useWindowDimensions
|
||||
} from "react-native";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
||||
import { db } from "../app/common/database";
|
||||
import { getElevation } from "../app/utils";
|
||||
import { useShareStore } from "./store";
|
||||
import { FlashList } from "@shopify/flash-list";
|
||||
|
||||
const ListItem = ({ item, mode, close }) => {
|
||||
const colors = useShareStore((state) => state.colors);
|
||||
@@ -338,7 +337,13 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {
|
||||
renderItem={renderItem}
|
||||
estimatedItemSize={50}
|
||||
ListHeaderComponent={
|
||||
searchResults.length === 0 && searchKeyword.current ? (
|
||||
mode === "selectTags" &&
|
||||
(searchResults.length === 0 ||
|
||||
(searchKeyword.current &&
|
||||
searchKeyword.current.length > 0 &&
|
||||
!searchResults.find(
|
||||
(item) => item.title === searchKeyword.current
|
||||
))) ? (
|
||||
<ListItem
|
||||
item={{
|
||||
type: "tag",
|
||||
|
||||
Reference in New Issue
Block a user