asap-feed-beta 12.1.6 → 12.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -845,10 +845,16 @@
845
845
  * @return {?}
846
846
  */
847
847
  function (item) {
848
+ var _this = this;
848
849
  console.log("[sendVisible] marcando como visualizado", item);
849
850
  /** @type {?} */
850
851
  var user = this.global.loggedUser();
851
852
  /** @type {?} */
853
+ var postData = {
854
+ post_id: item.id,
855
+ title: item.title
856
+ };
857
+ /** @type {?} */
852
858
  var data = {
853
859
  post_id: item.id,
854
860
  create_at: Date.now(),
@@ -861,15 +867,25 @@
861
867
  }
862
868
  };
863
869
  /** @type {?} */
864
- var collectionID = "feed-view/" + item.id + "/" + user.id;
870
+ var documentID = "feed-view/" + item.id;
865
871
  /** @type {?} */
866
- var collection = this.db.collection(collectionID);
867
- collection.add(data).then((/**
872
+ var document = this.db.doc(documentID);
873
+ document.set(postData).then((/**
868
874
  * @param {?} response
869
875
  * @return {?}
870
876
  */
871
877
  function (response) {
872
- console.log("[sendVisible] marcado como visualizado", response);
878
+ /** @type {?} */
879
+ var documentID = "feed-view/" + item.id + "/views/" + user.id;
880
+ /** @type {?} */
881
+ var document = _this.db.doc(documentID);
882
+ document.set(data).then((/**
883
+ * @param {?} response
884
+ * @return {?}
885
+ */
886
+ function (response) {
887
+ console.log("[sendVisible] marcado como visualizado", response);
888
+ }));
873
889
  }));
874
890
  };
875
891
  AsapFeedBetaComponent.decorators = [