Skip to content

Commit

Permalink
Merge pull request #474 from NicolasConstant/develop
Browse files Browse the repository at this point in the history
1.1.6 PR
  • Loading branch information
NicolasConstant authored Nov 18, 2022
2 parents 33a61f7 + 39abd6a commit 78f0f3a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sengi",
"version": "1.1.5",
"version": "1.1.6",
"license": "AGPL-3.0-or-later",
"main": "main-electron.js",
"description": "A multi-account desktop client for Mastodon and Pleroma",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ export class ManageAccountComponent extends BrowseBase {
private readonly toolsService: ToolsService,
private readonly mastodonService: MastodonWrapperService,
private readonly notificationService: NotificationService,
private readonly userNotificationService: UserNotificationService) {
private readonly userNotificationService: UserNotificationService) {
super();
}

ngOnInit() {
ngOnInit() {
}

ngOnDestroy(): void {
Expand All @@ -73,7 +73,7 @@ export class ManageAccountComponent extends BrowseBase {
private checkIfBookmarksAreAvailable() {
this.toolsService.getInstanceInfo(this.account.info)
.then((instance: InstanceInfo) => {
if (instance.major >= 3 && instance.minor >= 1) {
if (instance.major == 3 && instance.minor >= 1 || instance.major > 3) {
this.isBookmarksAvailable = true;
} else {
this.isBookmarksAvailable = false;
Expand Down Expand Up @@ -137,7 +137,7 @@ export class ManageAccountComponent extends BrowseBase {
loadSubPanel(subpanel: 'account' | 'notifications' | 'mentions' | 'dm' | 'favorites' | 'bookmarks'): boolean {
if(this.subPanel === subpanel){
switch(subpanel){
case 'bookmarks':
case 'bookmarks':
this.bookmarksComp.applyGoToTop();
break;
case 'notifications':
Expand All @@ -151,12 +151,12 @@ export class ManageAccountComponent extends BrowseBase {
break;
case 'favorites':
this.favoritesComp.applyGoToTop();
break;
break;
}
}

this.subPanel = subpanel;

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class ActionBarComponent implements OnInit, OnDestroy {
this.boostPromise = Promise.resolve(true);
}

const account = this.toolsService.getSelectedAccounts()[0];
const account = this.toolsService.getSelectedAccounts()[0];
this.boostPromise = this.boostPromise
.then(() => {
this.boostIsLoading = true;
Expand Down Expand Up @@ -231,11 +231,11 @@ export class ActionBarComponent implements OnInit, OnDestroy {
}

private favoritePromise: Promise<any>;
favorite(): boolean {
favorite(): boolean {
if (!this.favoritePromise) {
this.favoritePromise = Promise.resolve(true);
}

const account = this.toolsService.getSelectedAccounts()[0];
this.favoritePromise = this.favoritePromise
.then(() => {
Expand Down Expand Up @@ -282,7 +282,7 @@ export class ActionBarComponent implements OnInit, OnDestroy {
.then(() => {
this.bookmarkingIsLoading = true;
return this.toolsService.getStatusUsableByAccount(account, this.statusWrapper);
})
})
.then((status: Status) => {
if (this.isBookmarked && status.bookmarked) {
return this.mastodonService.unbookmark(account, status);
Expand Down Expand Up @@ -344,7 +344,7 @@ export class ActionBarComponent implements OnInit, OnDestroy {
private checkIfBookmarksAreAvailable(account: AccountInfo) {
this.toolsService.getInstanceInfo(account)
.then((instance: InstanceInfo) => {
if (instance.major >= 3 && instance.minor >= 1) {
if (instance.major == 3 && instance.minor >= 1 || instance.major > 3) {
this.isBookmarksAvailable = true;
} else {
this.isBookmarksAvailable = false;
Expand Down

0 comments on commit 78f0f3a

Please sign in to comment.