summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Bereza <p.bereza@samsung.com>2016-09-14 16:37:03 +0200
committerWonYoung Choi <wy80.choi@samsung.com>2016-09-20 10:00:36 +0900
commit4f34b8d56588ba111cfecd4b07c1af770b0d7209 (patch)
tree1b0b9e53cd53ab66b58faad157f96562a274c71f
parentc9b97b5a6120497e1f926c239000947ef876753a (diff)
downloadelm-sharp-4f34b8d56588ba111cfecd4b07c1af770b0d7209.tar.gz
elm-sharp-4f34b8d56588ba111cfecd4b07c1af770b0d7209.tar.bz2
elm-sharp-4f34b8d56588ba111cfecd4b07c1af770b0d7209.zip
Fix Popped event registration in InsertBefore
Change-Id: I364bd12ed50ff28be065582a72699d404b28c09f Signed-off-by: Piotr Bereza <p.bereza@samsung.com>
-rw-r--r--ElmSharp/ElmSharp/Naviframe.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ElmSharp/ElmSharp/Naviframe.cs b/ElmSharp/ElmSharp/Naviframe.cs
index 051cdd5..1604f0a 100644
--- a/ElmSharp/ElmSharp/Naviframe.cs
+++ b/ElmSharp/ElmSharp/Naviframe.cs
@@ -75,6 +75,11 @@ namespace ElmSharp
NaviItem naviItem = NaviItem.FromNativeHandle(item, content);
int idx = _itemStack.IndexOf(before);
_itemStack.Insert(idx, naviItem);
+ naviItem.Popped += (s, e) =>
+ {
+ _itemStack.Remove(naviItem);
+ Popped?.Invoke(this, new NaviframeEventArgs() { Content = naviItem.Content });
+ };
return naviItem;
}