Skip to content

Commit 3088c24

Browse files
authored
Merge pull request #1469 from ebkr/wrapper-functions
Add wrapper functions to make it easier for TSMM to inject extra code
2 parents d32a82f + 6a8a17c commit 3088c24

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/components/mixins/SplashMixin.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ export default class SplashMixin extends Vue {
4949
this.getRequestItem('ExclusionsList').setProgress(100);
5050
}
5151
52-
// Get the list of Thunderstore mods from API or local cache.
52+
// Wrapper to allow TSMM to inject telemetry gathering.
5353
async getThunderstoreMods() {
54+
await this._getThunderstoreMods();
55+
}
56+
57+
// Get the list of Thunderstore mods from API or local cache.
58+
async _getThunderstoreMods() {
5459
const packageListIndex = await this.fetchPackageListIndex();
5560
const packageListChunks = await this.fetchPackageListChunksIfUpdated(packageListIndex);
5661
this.getRequestItem('ThunderstoreDownload').setProgress(100);

src/components/mixins/UtilityMixin.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ export default class UtilityMixin extends Vue {
1515
setInterval(this.tryRefreshThunderstoreModList, this.REFRESH_INTERVAL);
1616
}
1717
18+
// Wrapper to allow TSMM to inject telemetry gathering.
1819
async refreshThunderstoreModList() {
20+
await this._refreshThunderstoreModList();
21+
}
22+
23+
async _refreshThunderstoreModList() {
1924
const packageListIndex: PackageListIndex = await this.$store.dispatch("tsMods/fetchPackageListIndex");
2025
2126
if (packageListIndex.isLatest) {

0 commit comments

Comments
 (0)