Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
Disable long press menu for system smart tags
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Jan 12, 2019
1 parent d7bb782 commit 4408e75
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,7 +28,7 @@
"react-navigation": "^3.0.9",
"react-navigation-header-buttons": "^2.1.1",
"regenerator": "^0.13.3",
"sn-models": "0.1.11",
"sn-models": "0.1.12",
"standard-file-js": "0.3.31"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/screens/SideMenu/MainSideMenu.js
Expand Up @@ -163,6 +163,7 @@ export default class MainSideMenu extends AbstractSideMenu {

<SideMenuSection title="Tags">
<TagSelectionList
hasBottomPadding={ApplicationState.isAndroid}
emptyPlaceholder={"No tags. Create one from the note composer."}
contentType="Tag"
onTagSelect={this.onTagSelect}
Expand Down
1 change: 1 addition & 0 deletions src/screens/SideMenu/NoteSideMenu.js
Expand Up @@ -288,6 +288,7 @@ export default class NoteSideMenu extends AbstractSideMenu {

<SideMenuSection title="Tags">
<TagSelectionList
hasBottomPadding={ApplicationState.isAndroid}
contentType="Tag"
onTagSelect={this.onTagSelect}
selectedTags={selectedTags}
Expand Down
8 changes: 8 additions & 0 deletions src/screens/SideMenu/TagSelectionList.js
Expand Up @@ -84,6 +84,10 @@ class TagSelectionList extends ThemedComponent {
}

showActionSheet = (tag) => {
if(tag.content.isSystemTag) {
return;
}

let sheet = new ActionSheetWrapper({
title: tag.title,
options: [
Expand Down Expand Up @@ -143,6 +147,7 @@ class TagSelectionList extends ThemedComponent {
return (
<Fragment>
<FlatList
style={this.styles.list}
initialNumToRender={10}
windowSize={10}
maxToRenderPerBatch={10}
Expand All @@ -162,6 +167,9 @@ class TagSelectionList extends ThemedComponent {

loadStyles() {
this.styles = {
list: {
paddingBottom: this.props.hasBottomPadding ? 30 : 0
},
emptyPlaceholderText: {
color: StyleKit.variables.stylekitForegroundColor,
opacity: 0.6,
Expand Down

0 comments on commit 4408e75

Please sign in to comment.