Skip to content

Commit

Permalink
Remove confirm step for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Jul 23, 2020
1 parent 5610ed2 commit 7a009ed
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
6 changes: 1 addition & 5 deletions lib/note-info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ import actions from '../state/actions';
import * as S from '../state';
import * as T from '../types';

type OwnProps = {
markdownEnabled: boolean;
};

type StateProps = {
isMarkdown: boolean;
isPinned: boolean;
Expand All @@ -30,7 +26,7 @@ type DispatchProps = {
pinNote: (noteId: T.EntityId, shouldPin: boolean) => any;
};

type Props = OwnProps & StateProps & DispatchProps;
type Props = StateProps & DispatchProps;

export class NoteInfo extends Component<Props> {
static displayName = 'NoteInfo';
Expand Down
10 changes: 0 additions & 10 deletions lib/state/action-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,6 @@ export type ChangeConnectionStatus = Action<
'CHANGE_CONNECTION_STATUS',
{ status: T.ConnectionState }
>;
export type ConfirmNewTag = Action<
'CONFIRM_NEW_TAG',
{
originalTagId: T.EntityId;
newTagId: T.EntityId;
tagName: T.TagName;
tag: T.Tag;
}
>;
export type GhostRemoveEntity = Action<
'GHOST_REMOVE_ENTITY',
{ bucketName: string; entityId: T.EntityId }
Expand Down Expand Up @@ -293,7 +284,6 @@ export type ActionType =
| CloseNote
| CloseDialog
| CloseRevision
| ConfirmNewTag
| CreateNote
| CreateNoteWithId
| DecreaseFontSize
Expand Down
9 changes: 0 additions & 9 deletions lib/state/data/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,6 @@ export const tags: A.Reducer<Map<T.TagHash, T.Tag>> = (
? state
: new Map(state).set(t(action.tagName), { name: action.tagName });

case 'CONFIRM_NEW_TAG': {
const next = new Map(state).set(
(action.newTagId as string) as T.TagHash,
action.tag
);
next.delete((action.originalTagId as string) as T.TagHash);
return next;
}

case 'EDIT_NOTE':
case 'IMPORT_NOTE_WITH_ID': {
const newTags =
Expand Down

0 comments on commit 7a009ed

Please sign in to comment.