Skip to content

Commit 7ec8715

Browse files
committed
Remove unused function that was missing types
1 parent 58e1ccc commit 7ec8715

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

src/sidebar/helpers/session.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ import { serviceConfig } from '../config/service-config';
55
* @typedef {import('../../types/api').Profile} Profile
66
*/
77

8-
/**
9-
* Returns true if the sidebar tutorial has to be shown to a user for a given session.
10-
* @deprecated To be removed once preact help/tutorial panel is in place
11-
*/
12-
export function shouldShowSidebarTutorial(sessionState) {
13-
if (sessionState.preferences.show_sidebar_tutorial) {
14-
return true;
15-
}
16-
return false;
17-
}
18-
198
/**
209
* The following things must all be true for the tutorial component to auto-display
2110
* on app launch:

src/sidebar/helpers/test/session-test.js

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
import * as sessionUtil from '../session';
22

33
describe('sidebar/helpers/session', () => {
4-
describe('#shouldShowSidebarTutorial', () => {
5-
it('shows sidebar tutorial if the settings object has the show_sidebar_tutorial key set', () => {
6-
const sessionState = {
7-
preferences: {
8-
show_sidebar_tutorial: true,
9-
},
10-
};
11-
12-
assert.isTrue(sessionUtil.shouldShowSidebarTutorial(sessionState));
13-
});
14-
15-
it('hides sidebar tutorial if the settings object does not have the show_sidebar_tutorial key set', () => {
16-
const sessionState = {
17-
preferences: {
18-
show_sidebar_tutorial: false,
19-
},
20-
};
21-
22-
assert.isFalse(sessionUtil.shouldShowSidebarTutorial(sessionState));
23-
});
24-
});
25-
26-
describe('#shouldAutoDisplayTutorial', () => {
4+
describe('shouldAutoDisplayTutorial', () => {
275
[
286
{
297
// The only "true" state

0 commit comments

Comments
 (0)