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 400
 		final JsMapStringJsObject map = model.cast();
400 401
 		if (null != map.get("userId")) {
401 402
 			mbox = map.getString("userId");
403
+			JsUser user = map.get("user").cast();
404
+			this.datalocation = user.getDataLocation();
402 405
 		} else if (null != map.get("mailshareId")) {
403 406
 			mbox = map.getString("mailshareId");
407
+			JsMailshare ms = map.get("mailshare").cast();
408
+			this.datalocation = ms.getDataLocation();
404 409
 		} else {
405 410
 			mbox = Ajax.TOKEN.getSubject();
411
+			// FIXME dataLocation
406 412
 		}
407 413
 
408
-		JsUser user = map.get("user").cast();
409
-		this.datalocation = user.getDataLocation();
410
-
411 414
 		this.domainUid = map.getString("domainUid");
412 415
 		sieveFilters.clear();
413 416
 		MailFilter mf = model.getMailFilter();