You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Mobile: Resolves #360: Don't crash if theme not set and improved logging.
This commit is contained in:
@ -72,8 +72,17 @@ const EncryptionService = require('lib/services/EncryptionService');
|
||||
|
||||
let storeDispatch = function(action) {};
|
||||
|
||||
const logReducerAction = function(action) {
|
||||
if (['SIDE_MENU_OPEN_PERCENT', 'SYNC_REPORT_UPDATE'].indexOf(action.type) >= 0) return;
|
||||
|
||||
let msg = [action.type];
|
||||
if (action.routeName) msg.push(action.routeName);
|
||||
|
||||
reg.logger().info('Reducer action', msg.join(', '));
|
||||
}
|
||||
|
||||
const generalMiddleware = store => next => async (action) => {
|
||||
if (['SIDE_MENU_OPEN_PERCENT', 'SYNC_REPORT_UPDATE'].indexOf(action.type) < 0) reg.logger().info('Reducer action', action.type);
|
||||
logReducerAction(action);
|
||||
PoorManIntervals.update(); // This function needs to be called regularly so put it here
|
||||
|
||||
const result = next(action);
|
||||
|
Reference in New Issue
Block a user