Skip to content

Commit 03353b5

Browse files
authored
Merge pull request #14 from manosim/thinner-sidebar
New Sidebar
2 parents 14fd1f6 + b1e0a76 commit 03353b5

File tree

14 files changed

+276
-420
lines changed

14 files changed

+276
-420
lines changed

main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ app.on('ready', () => {
162162
checkAutoUpdate(false);
163163
}
164164

165+
app.dock.hide();
165166
appTrayIcon = createAppIcon();
166167
initWindow();
167168
positioner.move('trayCenter', appTrayIcon.getBounds());

src/js/actions/index.test.ts

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -630,62 +630,6 @@ describe('actions/index.js', () => {
630630
});
631631
});
632632

633-
it('should check if the user has starred the repository (has)', () => {
634-
nock('https://api.github.com/')
635-
.get(`/user/starred/${Constants.REPO_SLUG}`)
636-
.reply(200);
637-
638-
const expectedActions = [
639-
{ type: actions.HAS_STARRED.REQUEST },
640-
{ type: actions.HAS_STARRED.SUCCESS, payload: '' },
641-
];
642-
643-
const store = createMockStore(
644-
{
645-
auth: { token: 'IAMATOKEN' },
646-
settings: {
647-
participating: false,
648-
isEnterprise: false,
649-
baseUrl: 'github.com',
650-
},
651-
notifications: { response: [] },
652-
},
653-
expectedActions
654-
);
655-
656-
return store.dispatch(actions.checkHasStarred()).then(() => {
657-
expect(store.getActions()).toEqual(expectedActions);
658-
});
659-
});
660-
661-
it('should check if the user has starred the repository (has not)', () => {
662-
nock('https://api.github.com/')
663-
.get(`/user/starred/${Constants.REPO_SLUG}`)
664-
.reply(404);
665-
666-
const expectedActions = [
667-
{ type: actions.HAS_STARRED.REQUEST },
668-
{ type: actions.HAS_STARRED.FAILURE, payload: '' },
669-
];
670-
671-
const store = createMockStore(
672-
{
673-
auth: { token: 'IAMATOKEN' },
674-
settings: {
675-
participating: false,
676-
isEnterprise: false,
677-
baseUrl: 'github.com',
678-
},
679-
notifications: { response: [] },
680-
},
681-
expectedActions
682-
);
683-
684-
return store.dispatch(actions.checkHasStarred()).then(() => {
685-
expect(store.getActions()).toEqual(expectedActions);
686-
});
687-
});
688-
689633
it('should search the notifications with a query', () => {
690634
const query = 'hello';
691635

src/js/actions/index.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,6 @@ export function markRepoNotifications(repoSlug, hostname) {
193193
};
194194
}
195195

196-
// Starred
197-
198-
export const HAS_STARRED = makeAsyncActionSet('HAS_STARRED');
199-
export function checkHasStarred() {
200-
return (dispatch, getState: () => AppState) => {
201-
const url = `https://api.${Constants.DEFAULT_AUTH_OPTIONS.hostname}/user/starred/${Constants.REPO_SLUG}`;
202-
const method = 'GET';
203-
const token = getState().auth.token;
204-
205-
dispatch({ type: HAS_STARRED.REQUEST });
206-
207-
return apiRequestAuth(url, method, token)
208-
.then(function(response) {
209-
dispatch({ type: HAS_STARRED.SUCCESS, payload: response.data });
210-
})
211-
.catch(function(error) {
212-
dispatch({ type: HAS_STARRED.FAILURE, payload: error.response.data });
213-
});
214-
};
215-
}
216-
217196
// Search
218197

219198
export const SEARCH_NOTIFICATIONS = 'SEARCH_NOTIFICATIONS';

0 commit comments

Comments
 (0)