Skip to content

Commit c6d210f

Browse files
committed
Clean up omnibar a bit
1 parent 8d2e107 commit c6d210f

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/extension/omnibar.ts

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Bids, DonationTotalMilestones, Omnibar, Prizes } from '@esa-layouts/types/schemas';
1+
import { Bids, DonationTotalMilestones, Prizes } from '@esa-layouts/types/schemas';
22
import clone from 'clone';
33
import { orderBy } from 'lodash';
44
import { join } from 'path';
@@ -8,18 +8,11 @@ import { v4 as uuid } from 'uuid';
88
import { get as nodecg } from './util/nodecg';
99
import obs from './util/obs';
1010
import { mq } from './util/rabbitmq';
11-
import { assetsDonationAlertAssets, bids, commentatorsNew, donationAlerts, donationReaderNew, donationTotalMilestones, omnibar, prizes } from './util/replicants';
11+
import { assetsDonationAlertAssets, bids, donationAlerts, donationTotalMilestones, omnibar, prizes } from './util/replicants';
1212
import { sc } from './util/speedcontrol';
1313

1414
const config = nodecg().bundleConfig;
1515

16-
// Temporary storage used for mini credits subscriptions/cheers/alerts while they are playing.
17-
let tempMiniCreditsStorage: Omnibar['miniCredits'] = {
18-
runSubs: [],
19-
runCheers: [],
20-
runDonations: [],
21-
};
22-
2316
// Filter helper used below.
2417
function filterUpcomingRuns(run: RunData): boolean {
2518
return !run.scheduledS || run.scheduledS >= (Date.now() / 1000);
@@ -264,10 +257,6 @@ omnibar.on('change', (newVal, oldVal) => {
264257

265258
// Listens for messages from the graphic to change to the next message.
266259
nodecg().listenFor('omnibarShowNext', (data, ack) => {
267-
// If omnibar was just showing mini credits and ended successfully, erase temp storage.
268-
if (omnibar.value.current?.type === 'MiniCredits') {
269-
tempMiniCreditsStorage = { runSubs: [], runCheers: [], runDonations: [] };
270-
}
271260
showNext();
272261
if (ack && !ack?.handled) ack();
273262
});

0 commit comments

Comments
 (0)