Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #4854

Merged
merged 5 commits into from
Sep 15, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Wrap featureTips markdown
`markdown` takes too long to load for it to be worth preloading
  • Loading branch information
larsjohnsen committed Sep 13, 2018
commit 24e1e346c261ea0a4b558568d6b63c62e1a59427
5 changes: 3 additions & 2 deletions lib/modules/RESTips.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ async function dailyTip(): Promise<boolean> { // `true` if daily tip is being sh
function generateContent({ message, keyboard, options }: Tip) {
const description = [];

if (message) description.push(message);
if (typeof message === 'function') description.push(message());
else if (typeof message === 'string') description.push(message);

if (keyboard) {
// TODO: microtemplate
Expand Down Expand Up @@ -204,7 +205,7 @@ function generateContentOption(option) {
}

export type Tip = {|
message: string,
message: string | () => string,
title?: string,
attachTo?: string | HTMLElement,
position?: number,
Expand Down
3 changes: 2 additions & 1 deletion lib/modules/filteReddit.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ RES allows you to easily apply complex filters to post listings and comments. To
quiet: true,
},
filterlineVisible: {
message: markdown(`
// Wrap as to avoid loading markdown unnecessarily
message: () => markdown(`
* Click once on a filter to enable it (e.g. clicking \`expando\` will only show posts with embedded media).
* Click again to only show posts which do not not match.
* A third click makes the filter inactive.
Expand Down