Skip to content

Commit 1feada6

Browse files
committed
fix: extension stars not showing up in installed section
1 parent 2137d7a commit 1feada6

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

src/extensibility/ExtensionManagerView.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -290,25 +290,22 @@ define(function (require, exports, module) {
290290
context.disabled = (entry.installInfo && entry.installInfo.status === ExtensionManager.DISABLED);
291291
context.hasVersionInfo = !!info.versions;
292292

293-
let isVerified = false;
294-
if(context.ownershipVerifiedByGitHub){
295-
context.verified = StringUtils.format(Strings.EXTENSION_VERIFIED_PUBLISHER,
296-
context.ownershipVerifiedByGitHub[0].replace("https://", ""));
297-
context.verifiedURL = context.ownershipVerifiedByGitHub[0];
298-
isVerified = true;
299-
}
300-
301-
if(context.gihubStars){
302-
context.githubStarCount = context.gihubStars;
303-
}
304-
305293
if (entry.registryInfo) {
306294
var latestVerCompatInfo = ExtensionManager.getCompatibilityInfo(entry.registryInfo, brackets.metadata.apiVersion);
307295
context.isCompatible = latestVerCompatInfo.isCompatible;
308296
context.requiresNewer = latestVerCompatInfo.requiresNewer;
309297
context.isCompatibleLatest = latestVerCompatInfo.isLatestVersion;
310-
entry.registryInfo.isVerified = isVerified ? 1 : 0;
311-
entry.registryInfo.githubStarCount = context.githubStarCount;
298+
if(entry.registryInfo.ownerRepo){
299+
context.githubStarCount = entry.registryInfo.gihubStars || "0";
300+
context.ownerRepo = entry.registryInfo.ownerRepo;
301+
}
302+
entry.registryInfo.isVerified = 0;
303+
if(entry.registryInfo.ownershipVerifiedByGitHub){
304+
context.verified = StringUtils.format(Strings.EXTENSION_VERIFIED_PUBLISHER,
305+
entry.registryInfo.ownershipVerifiedByGitHub[0].replace("https://", ""));
306+
context.verifiedURL = entry.registryInfo.ownershipVerifiedByGitHub[0];
307+
entry.registryInfo.isVerified = 1;
308+
}
312309
if (!context.isCompatibleLatest) {
313310
var installWarningBase = context.requiresNewer ? Strings.EXTENSION_LATEST_INCOMPATIBLE_NEWER : Strings.EXTENSION_LATEST_INCOMPATIBLE_OLDER;
314311
context.installWarning = StringUtils.format(installWarningBase, entry.registryInfo.versions[entry.registryInfo.versions.length - 1].version, latestVerCompatInfo.compatibleVersion);

src/htmlContent/extension-manager-dialog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<select class="sort-extensions">
2929
<option value="publishedDate">{{Strings.EXTENSIONS_LAST_UPDATED}}</option>
3030
<option value="totalDownloads">{{Strings.EXTENSIONS_DOWNLOADS}}</option>
31-
<option value="githubStarCount">{{Strings.EXTENSION_STAR_SORT}}</option>
31+
<option value="gihubStars">{{Strings.EXTENSION_STAR_SORT}}</option>
3232
<option value="isVerified">{{Strings.EXTENSION_VERIFIED_SORT}}</option>
3333
</select>
3434
</div>

0 commit comments

Comments
 (0)