Browse code

Fix: handle mailshare

Thomas Fricker authored on 04/12/2018 16:11:15
Showing 2 changed files
... ...
@@ -24,7 +24,8 @@ Require-Bundle: net.bluemind.ui.gwtcommon.icons;bundle-version="3.1.0",
24 24
  net.bluemind.mailmessage.api.gwt;visibility:=reexport,
25 25
  net.bluemind.ui.gwttask,
26 26
  net.bluemind.backend.mail.api.gwt,
27
- net.bluemind.backend.mail.api
27
+ net.bluemind.backend.mail.api,
28
+ net.bluemind.mailshare.api.gwt
28 29
 Export-Package: net.bluemind.ui.mailbox,
29 30
  net.bluemind.ui.mailbox.backend,
30 31
  net.bluemind.ui.mailbox.filter,
... ...
@@ -54,6 +54,7 @@ import net.bluemind.mailbox.api.MailFilter;
54 54
 import net.bluemind.mailbox.api.MailFilter.Rule;
55 55
 import net.bluemind.mailbox.api.gwt.js.JsMailFilterRule;
56 56
 import net.bluemind.mailbox.api.gwt.serder.MailFilterRuleGwtSerDer;
57
+import net.bluemind.mailshare.api.gwt.js.JsMailshare;
57 58
 import net.bluemind.ui.common.client.icon.Trash;
58 59
 import net.bluemind.user.api.gwt.js.JsUser;
59 60
 
... ...
@@ -399,15 +400,17 @@ public class SieveEdit extends CompositeGwtWidgetElement {
399 399
 		final JsMapStringJsObject map = model.cast();
400 400
 		if (null != map.get("userId")) {
401 401
 			mbox = map.getString("userId");
402
+			JsUser user = map.get("user").cast();
403
+			this.datalocation = user.getDataLocation();
402 404
 		} else if (null != map.get("mailshareId")) {
403 405
 			mbox = map.getString("mailshareId");
406
+			JsMailshare ms = map.get("mailshare").cast();
407
+			this.datalocation = ms.getDataLocation();
404 408
 		} else {
405 409
 			mbox = Ajax.TOKEN.getSubject();
410
+			// FIXME dataLocation
406 411
 		}
407 412
 
408
-		JsUser user = map.get("user").cast();
409
-		this.datalocation = user.getDataLocation();
410
-
411 413
 		this.domainUid = map.getString("domainUid");
412 414
 		sieveFilters.clear();
413 415
 		MailFilter mf = model.getMailFilter();