1
0
mirror of https://github.com/NicolasConstant/sengi synced 2025-02-08 07:58:47 +01:00

Merge pull request #656 from NicolasConstant/develop

1.7.1 PR
This commit is contained in:
Nicolas Constant 2024-11-26 21:37:29 -05:00 committed by GitHub
commit c05cfa6c21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 36 deletions

37
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "sengi",
"version": "1.5.0",
"version": "1.7.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -2492,7 +2492,6 @@
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
"dev": true,
"optional": true,
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
@ -2502,15 +2501,13 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true,
"optional": true
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"optional": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@ -2526,7 +2523,6 @@
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "~5.1.0"
}
@ -3812,8 +3808,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true,
"optional": true
"dev": true
},
"constants-browserify": {
"version": "1.0.0",
@ -4202,8 +4197,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
"dev": true,
"optional": true
"dev": true
},
"depd": {
"version": "1.1.2",
@ -5186,7 +5180,6 @@
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"dev": true,
"optional": true,
"requires": {
"path-exists": "^2.0.0",
"pinkie-promise": "^2.0.0"
@ -5197,7 +5190,6 @@
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"dev": true,
"optional": true,
"requires": {
"pinkie-promise": "^2.0.0"
}
@ -5870,7 +5862,6 @@
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
"integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
@ -5883,7 +5874,6 @@
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
"dev": true,
"optional": true,
"requires": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
@ -5921,8 +5911,7 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
"dev": true,
"optional": true
"dev": true
},
"get-stream": {
"version": "3.0.0",
@ -6134,8 +6123,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
"dev": true,
"optional": true
"dev": true
},
"has-value": {
"version": "1.0.0",
@ -6890,8 +6878,7 @@
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true,
"optional": true
"dev": true
},
"is-windows": {
"version": "1.0.2",
@ -7628,7 +7615,6 @@
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
@ -7960,8 +7946,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
"dev": true,
"optional": true
"dev": true
},
"map-visit": {
"version": "1.0.0",
@ -8719,7 +8704,6 @@
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"dev": true,
"optional": true,
"requires": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
@ -9403,7 +9387,6 @@
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.0.0",
@ -9935,7 +9918,6 @@
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"dev": true,
"optional": true,
"requires": {
"load-json-file": "^1.0.0",
"normalize-package-data": "^2.3.2",
@ -9947,7 +9929,6 @@
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"dev": true,
"optional": true,
"requires": {
"find-up": "^1.0.0",
"read-pkg": "^1.0.0"
@ -11400,7 +11381,6 @@
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"dev": true,
"optional": true,
"requires": {
"is-utf8": "^0.2.0"
}
@ -12762,7 +12742,6 @@
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
"dev": true,
"optional": true,
"requires": {
"string-width": "^1.0.2 || 2"
}

View File

@ -1,6 +1,6 @@
{
"name": "sengi",
"version": "1.7.0",
"version": "1.7.1",
"license": "AGPL-3.0-or-later",
"main": "main-electron.js",
"description": "A multi-account desktop client for Mastodon and Pleroma",

View File

@ -7,7 +7,7 @@
<!-- data-simplebar -->
<div class="stream-toots__status" *ngFor="let conversationWrapper of conversations">
<div class="conversation__participants" title="participants">
<div class="conversation__participants" title="participants" *ngIf="conversationWrapper.lastStatus && conversationWrapper.lastStatus.status">
<fa-icon [icon]="faUserFriends" class="conversation__icon"></fa-icon>
<img class="conversation__avatar" src="{{ conversationWrapper.userAvatar }}" title="me" />
<div *ngFor="let acc of conversationWrapper.conversation.accounts">

View File

@ -68,6 +68,12 @@ export class StatusComponent implements OnInit {
@Input('statusWrapper')
set statusWrapper(value: StatusWrapper) {
if(!value || !value.status) {
console.error('null status provided');
this.hideStatus = true;
return;
}
this._statusWrapper = value;
this.status = value.status;
this.isSelected = value.isSelected;

View File

@ -158,8 +158,6 @@ export class ThreadComponent extends BrowseBase {
const sourceAccount = openThreadEvent.sourceAccount;
if (status.visibility === 'public' || status.visibility === 'unlisted') {
// var statusPromise: Promise<Status> = Promise.resolve(status);
// if (!sourceAccount || sourceAccount.id !== currentAccount.id) {
var statusPromise = this.toolsService.getInstanceInfo(currentAccount)
.then(instance => {
let version: 'v1' | 'v2' = 'v1';
@ -167,13 +165,17 @@ export class ThreadComponent extends BrowseBase {
return this.mastodonService.search(currentAccount, status.uri, version, true);
})
.then((result: Results) => {
let retrievedStatus: Status = null;
if (result.statuses.length === 1) {
const retrievedStatus = result.statuses[0];
retrievedStatus = result.statuses[0];
} else if(result.statuses.length > 1){
retrievedStatus = result.statuses.find(({ uri }) => uri === status.uri);
}
if (retrievedStatus) {
return retrievedStatus;
}
throw new Error('could not find status');
});
// }
this.retrieveThread(currentAccount, statusPromise);
@ -202,7 +204,6 @@ export class ThreadComponent extends BrowseBase {
if (i == position) wrapper.isSelected = true;
// this.statuses.push(wrapper);
localStatuses.push(wrapper);
}
return localStatuses;