( context?: TipContext, )
| 30 | } |
| 31 | |
| 32 | export async function getTipToShowOnSpinner( |
| 33 | context?: TipContext, |
| 34 | ): Promise<Tip | undefined> { |
| 35 | // Check if tips are disabled (default to true if not set) |
| 36 | if (getSettings_DEPRECATED().spinnerTipsEnabled === false) { |
| 37 | return undefined |
| 38 | } |
| 39 | |
| 40 | const tips = await getRelevantTips(context) |
| 41 | if (tips.length === 0) { |
| 42 | return undefined |
| 43 | } |
| 44 | |
| 45 | return selectTipWithLongestTimeSinceShown(tips) |
| 46 | } |
| 47 | |
| 48 | export function recordShownTip(tip: Tip): void { |
| 49 | // Record in history |
no test coverage detected