asap-feed-beta 12.1.7 → 12.1.8
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.
- package/bundles/asap-feed-beta.umd.js +19 -6
- package/bundles/asap-feed-beta.umd.js.map +1 -1
- package/bundles/asap-feed-beta.umd.min.js +2 -2
- package/bundles/asap-feed-beta.umd.min.js.map +1 -1
- package/esm2015/lib/asap-feed-beta.component.js +20 -7
- package/esm5/lib/asap-feed-beta.component.js +20 -7
- package/fesm2015/asap-feed-beta.js +19 -6
- package/fesm2015/asap-feed-beta.js.map +1 -1
- package/fesm5/asap-feed-beta.js +19 -6
- package/fesm5/asap-feed-beta.js.map +1 -1
- package/package.json +1 -1
|
@@ -852,12 +852,13 @@
|
|
|
852
852
|
/** @type {?} */
|
|
853
853
|
var postData = {
|
|
854
854
|
post_id: item.id,
|
|
855
|
-
title: item.title
|
|
855
|
+
title: item.title,
|
|
856
|
+
created_at: item.updated_at
|
|
856
857
|
};
|
|
857
858
|
/** @type {?} */
|
|
858
859
|
var data = {
|
|
859
860
|
post_id: item.id,
|
|
860
|
-
|
|
861
|
+
created_at: Date.now(),
|
|
861
862
|
updated_at: Date.now(),
|
|
862
863
|
user_info: {
|
|
863
864
|
id: user.id,
|
|
@@ -879,13 +880,25 @@
|
|
|
879
880
|
var documentID = "feed-view/" + item.id + "/views/" + user.id;
|
|
880
881
|
/** @type {?} */
|
|
881
882
|
var document = _this.db.doc(documentID);
|
|
882
|
-
document.
|
|
883
|
-
* @param {?}
|
|
883
|
+
document.get().subscribe((/**
|
|
884
|
+
* @param {?} doc
|
|
884
885
|
* @return {?}
|
|
885
886
|
*/
|
|
886
|
-
function (
|
|
887
|
-
|
|
887
|
+
function (doc) {
|
|
888
|
+
if (!doc.exists) {
|
|
889
|
+
doc.ref.set(data).then((/**
|
|
890
|
+
* @param {?} response
|
|
891
|
+
* @return {?}
|
|
892
|
+
*/
|
|
893
|
+
function (response) {
|
|
894
|
+
console.log("[sendVisible] marcado como visualizado", response);
|
|
895
|
+
}));
|
|
896
|
+
}
|
|
897
|
+
else {
|
|
898
|
+
console.log("[sendVisible] já foi marcado como visualizado", doc);
|
|
899
|
+
}
|
|
888
900
|
}));
|
|
901
|
+
_this.db.collection(documentID + "/history").add(data);
|
|
889
902
|
}));
|
|
890
903
|
};
|
|
891
904
|
AsapFeedBetaComponent.decorators = [
|