Bookmark from TitleBar

Summary: Add action to bookmark current location

Reviewed By: passy

Differential Revision: D17419666

fbshipit-source-id: 69e845e802260c150ae2f17649cea05bea1ae4ec
This commit is contained in:
Daniel Büchele
2019-09-17 10:15:33 -07:00
committed by Facebook Github Bot
parent bd1fc342c8
commit 108c49f572
3 changed files with 45 additions and 23 deletions

View File

@@ -147,8 +147,7 @@ export default class extends FlipperPlugin<State, any, PersistedState> {
addBookmark = (bookmark: Bookmark) => {
const newBookmark = {
uri: bookmark.uri,
commonName:
bookmark.commonName.length > 0 ? bookmark.commonName : bookmark.uri,
commonName: bookmark.commonName,
};
writeBookmarkToDB(newBookmark);

View File

@@ -32,7 +32,7 @@ export type NavigationEvent = {
export type Bookmark = {
uri: URI;
commonName: string;
commonName: string | null;
};
export type AutoCompleteProvider = {