Skip to content

Commit

Permalink
chore: remove redundand sagas
Browse files Browse the repository at this point in the history
  • Loading branch information
siepra committed Apr 23, 2024
1 parent 12b24d4 commit de6eb32
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 83 deletions.

This file was deleted.

4 changes: 1 addition & 3 deletions packages/mobile/src/store/init/init.master.saga.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { all, takeEvery, takeLatest, takeLeading } from 'typed-redux-saga'
import { all, takeLatest, takeLeading } from 'typed-redux-saga'
import { initActions } from './init.slice'
import { blindConnectionSaga } from './blindConnection/blindConnection.saga'
import { startConnectionSaga } from './startConnection/startConnection.saga'
import { deepLinkSaga } from './deepLink/deepLink.saga'

export function* initMasterSaga(): Generator {
yield all([
takeEvery(initActions.blindWebsocketConnection.type, blindConnectionSaga),
takeLatest(initActions.startWebsocketConnection.type, startConnectionSaga),
takeLeading(initActions.deepLink.type, deepLinkSaga),
])
Expand Down
1 change: 0 additions & 1 deletion packages/mobile/src/store/init/init.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const initSlice = createSlice({
id: event,
})
},
blindWebsocketConnection: state => state,
startWebsocketConnection: (state, _action: PayloadAction<WebsocketConnectionPayload>) => state,
suspendWebsocketConnection: state => {
state.isWebsocketConnected = false
Expand Down

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions packages/mobile/src/store/root.saga.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { all, takeEvery, fork } from 'typed-redux-saga'
import { all, takeEvery } from 'typed-redux-saga'
import { nativeServicesMasterSaga } from './nativeServices/nativeServices.master.saga'
import { navigationMasterSaga } from './navigation/navigation.master.saga'
import { initMasterSaga } from './init/init.master.saga'
import { initActions } from './init/init.slice'
import { setupCryptoSaga } from './init/setupCrypto/setupCrypto.saga'
import { publicChannels } from '@quiet/state-manager'
import { showNotificationSaga } from './nativeServices/showNotification/showNotification.saga'
import { restoreConnectionSaga } from './init/startConnection/restoreConnection/restoreConnection.saga'

export function* rootSaga(): Generator {
yield all([
takeEvery(initActions.setStoreReady.type, setupCryptoSaga),
takeEvery(initActions.setStoreReady.type, initMasterSaga),
takeEvery(initActions.setStoreReady.type, navigationMasterSaga),
takeEvery(initActions.setStoreReady.type, nativeServicesMasterSaga),
// fork(restoreConnectionSaga),
// Below line is reponsible for displaying notifications about messages from channels other than currently viewing one
takeEvery(publicChannels.actions.markUnreadChannel.type, showNotificationSaga),
])
Expand Down

0 comments on commit de6eb32

Please sign in to comment.