Skip to content

Commit

Permalink
fixde linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
matthme committed Dec 13, 2023
1 parent 929964f commit e5d7d81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions src/renderer/src/elements/applets-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { weStoreContext } from '../context.js';
import { WeStore } from '../we-store.js';
import { weStyles } from '../shared-styles.js';
import { AppletStore } from '../applets/applet-store.js';
import { appEntryActionHashFromDistInfo } from '../utils.js';

@localized()
@customElement('applets-sidebar')
Expand All @@ -36,8 +37,15 @@ export class AppletsSidebar extends LitElement {
const appletsByBundleHash: HoloHashMap<ActionHash, AppletStore> = new HoloHashMap();

for (const [_appletHash, appletStore] of Array.from(applets.entries())) {
if (!appletsByBundleHash.has(appletStore.applet.appstore_app_hash)) {
appletsByBundleHash.set(appletStore.applet.appstore_app_hash, appletStore);
if (
!appletsByBundleHash.has(
appEntryActionHashFromDistInfo(appletStore.applet.distribution_info),
)
) {
appletsByBundleHash.set(
appEntryActionHashFromDistInfo(appletStore.applet.distribution_info),
appletStore,
);
}
}

Expand All @@ -54,7 +62,9 @@ export class AppletsSidebar extends LitElement {
this.dispatchEvent(
new CustomEvent('applet-selected', {
detail: {
appletBundleHash: appletStore.applet.appstore_app_hash,
appletBundleHash: appEntryActionHashFromDistInfo(
appletStore.applet.distribution_info,
),
},
bubbles: true,
composed: true,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/we-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
asyncReadable,
} from '@holochain-open-dev/stores';
import { DnaHashMap, HoloHashMap, LazyHoloHashMap, pickBy, slice } from '@holochain-open-dev/utils';
import { AppInfo, AppWebsocket, InstalledAppId, ProvisionedCell } from '@holochain/client';
import { AppInfo, AppWebsocket, ProvisionedCell } from '@holochain/client';
import { encodeHashToBase64 } from '@holochain/client';
import { EntryHashB64 } from '@holochain/client';
import { ActionHash, AdminWebsocket, CellType, DnaHash, EntryHash } from '@holochain/client';
Expand Down

0 comments on commit e5d7d81

Please sign in to comment.