stream-chat-angular 3.0.0-beta.8 → 3.0.0-beta.9
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/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +12 -7
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment.service.js +11 -5
- package/fesm2015/stream-chat-angular.js +11 -5
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
package/assets/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.0.0-beta.
|
|
1
|
+
export declare const version = "3.0.0-beta.9";
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
var version = '3.0.0-beta.
|
|
357
|
+
var version = '3.0.0-beta.9';
|
|
358
358
|
|
|
359
359
|
/**
|
|
360
360
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
@@ -1888,7 +1888,7 @@
|
|
|
1888
1888
|
*/
|
|
1889
1889
|
AttachmentService.prototype.deleteAttachment = function (upload) {
|
|
1890
1890
|
return __awaiter(this, void 0, void 0, function () {
|
|
1891
|
-
var attachmentUploads, error_1;
|
|
1891
|
+
var attachmentUploads, result, index, error_1, index;
|
|
1892
1892
|
return __generator(this, function (_d) {
|
|
1893
1893
|
switch (_d.label) {
|
|
1894
1894
|
case 0:
|
|
@@ -1900,18 +1900,23 @@
|
|
|
1900
1900
|
return [4 /*yield*/, this.channelService.deleteAttachment(upload)];
|
|
1901
1901
|
case 2:
|
|
1902
1902
|
_d.sent();
|
|
1903
|
-
|
|
1903
|
+
result = __spreadArray([], __read(attachmentUploads));
|
|
1904
|
+
index = attachmentUploads.indexOf(upload);
|
|
1905
|
+
result.splice(index, 1);
|
|
1904
1906
|
return [3 /*break*/, 4];
|
|
1905
1907
|
case 3:
|
|
1906
1908
|
error_1 = _d.sent();
|
|
1909
|
+
result = attachmentUploads;
|
|
1907
1910
|
this.notificationService.addTemporaryNotification('streamChat.Error deleting attachment');
|
|
1908
1911
|
return [3 /*break*/, 4];
|
|
1909
1912
|
case 4: return [3 /*break*/, 6];
|
|
1910
1913
|
case 5:
|
|
1911
|
-
|
|
1914
|
+
result = __spreadArray([], __read(attachmentUploads));
|
|
1915
|
+
index = attachmentUploads.indexOf(upload);
|
|
1916
|
+
result.splice(index, 1);
|
|
1912
1917
|
_d.label = 6;
|
|
1913
1918
|
case 6:
|
|
1914
|
-
this.attachmentUploadsSubject.next(__spreadArray([], __read(
|
|
1919
|
+
this.attachmentUploadsSubject.next(__spreadArray([], __read(result)));
|
|
1915
1920
|
return [2 /*return*/];
|
|
1916
1921
|
}
|
|
1917
1922
|
});
|
|
@@ -1994,16 +1999,16 @@
|
|
|
1994
1999
|
};
|
|
1995
2000
|
AttachmentService.prototype.uploadAttachments = function (uploads) {
|
|
1996
2001
|
return __awaiter(this, void 0, void 0, function () {
|
|
1997
|
-
var
|
|
2002
|
+
var result, attachmentUploads;
|
|
1998
2003
|
var _this = this;
|
|
1999
2004
|
return __generator(this, function (_d) {
|
|
2000
2005
|
switch (_d.label) {
|
|
2001
2006
|
case 0:
|
|
2002
|
-
attachmentUploads = this.attachmentUploadsSubject.getValue();
|
|
2003
2007
|
this.attachmentUploadInProgressCounterSubject.next(this.attachmentUploadInProgressCounterSubject.getValue() + 1);
|
|
2004
2008
|
return [4 /*yield*/, this.channelService.uploadAttachments(uploads)];
|
|
2005
2009
|
case 1:
|
|
2006
2010
|
result = _d.sent();
|
|
2011
|
+
attachmentUploads = this.attachmentUploadsSubject.getValue();
|
|
2007
2012
|
result.forEach(function (r) {
|
|
2008
2013
|
var upload = attachmentUploads.find(function (upload) { return upload.file === r.file; });
|
|
2009
2014
|
if (!upload) {
|