Fix #890 Fix delete by initializing the metrics on android; delete was trying to use metrics and causing an exception because it hadn't been initialized

This commit is contained in:
Donovan Preston 2018-12-17 16:40:17 -05:00
parent 793dfb4f42
commit c71ef9ae84
2 changed files with 4 additions and 0 deletions

View file

@ -74,6 +74,7 @@ export default function(state, emitter) {
});
emitter.on('delete', async ({ file, location }) => {
console.log('ondelete');
try {
metrics.deletedUpload({
size: file.size,
@ -86,6 +87,7 @@ export default function(state, emitter) {
state.storage.remove(file.id);
await file.del();
} catch (e) {
console.log(e.stack);
state.raven.captureException(e);
}
render();