protected override void OnActivated()
        {
            base.OnActivated();
            NewObjectViewController controller = Frame.GetController <NewObjectViewController>();

            View _view = controller.View;

            var _object = _view.CurrentObject;

            if (LastModel.lastActiveObject == null)
            {
                LastModel.lastActiveObject = new List <object>();
            }
            if (_object != null)
            {
                INewItem _needForSetData = _object as INewItem;
                if (_needForSetData != null)
                {
                    _needForSetData.NewItem();
                }
                if (!LastModel.lastActiveObject.Contains(_object))
                {
                    LastModel.lastActiveObject.Add(_object);
                }
            }
        }
Exemplo n.º 2
0
 public static void SeenByUser(this INewItem item)
 {
     RealmDb.Instance.Write((Action)(() =>
     {
         if (!(item is RealmObject))
         {
             return;
         }
         item.SeenByUser = true;
         RealmDb.Instance.Add(item as RealmObject, true);
     }));
 }