|
@@ -1,7 +1,6 @@
|
1
|
1
|
/* @flow */
|
2
|
2
|
|
3
|
3
|
import { APP_WILL_MOUNT } from '../../app';
|
4
|
|
-import { CONFERENCE_FAILED, CONFERENCE_LEFT } from '../../base/conference';
|
5
|
4
|
import {
|
6
|
5
|
getAvatarURL,
|
7
|
6
|
getLocalParticipant,
|
|
@@ -37,8 +36,15 @@ const _PREFETCH_AVATAR_URLS = false;
|
37
|
36
|
MiddlewareRegistry.register(({ getState }) => next => action => {
|
38
|
37
|
switch (action.type) {
|
39
|
38
|
case APP_WILL_MOUNT:
|
40
|
|
- case CONFERENCE_FAILED:
|
41
|
|
- case CONFERENCE_LEFT:
|
|
39
|
+ // XXX CONFERENCE_FAILED/LEFT are no longer used here because they
|
|
40
|
+ // are tricky to get right as detectors of the moments in time at which
|
|
41
|
+ // CachedImage is not used. Anyway, if ImageCache is to be cleared from
|
|
42
|
+ // time to time, SET_LOCATION_URL is a much easier detector of such
|
|
43
|
+ // opportune times. Fixes at least one 100%-reproducible case of
|
|
44
|
+ // "TypeError: Cannot read property handlers of undefined." Anyway, in
|
|
45
|
+ // order to reduce the re-downloading of the same avatars, eventually we
|
|
46
|
+ // decided to not clear during the runtime of the app (other that at the
|
|
47
|
+ // beginning that is).
|
42
|
48
|
ImageCache && ImageCache.get().clear();
|
43
|
49
|
break;
|
44
|
50
|
|