Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/containers/main/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ class Main extends Component {
}

componentWillMount() {
this.fetchTrending(0);
document.addEventListener(`keydown`, (event) => {
if (event.key === `Escape`) {
this.doClear();
}
});
if (getGlobalElectronProperty(`fetchTrending`)) {
this.fetchTrending(0);
}
}

@autobind
Expand Down
10 changes: 10 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function create (opts) {
hideAlert: settings.get(`hideAlert`, false),
includeHashTag: settings.get(`includeHashTag`, true),
hideOnCopy: settings.get(`hideOnCopy`, true),
fetchTrending: settings.get(`fetchTrending`, true),
launchAtLogin: false, // setting not necessary as the OS handles that.
globalShortcut: settings.get(`globalShortcut`, true),
giphyAPIKey: env.GIPHY_API_KEY
Expand Down Expand Up @@ -254,6 +255,15 @@ function create (opts) {
settings.set(`hideOnCopy`, global.sharedObject.hideOnCopy);
}
},
{
label: `Show trending gifs`,
type: `checkbox`,
checked: global.sharedObject.fetchTrending,
click: function() {
global.sharedObject.fetchTrending = !global.sharedObject.fetchTrending;
settings.set(`fetchTrending`, global.sharedObject.fetchTrending);
}
},
{
label: `Global Shortcut ⌘-Alt-G`,
type: `checkbox`,
Expand Down