Skip to content

Commit

Permalink
load all editions
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadbky committed Aug 10, 2024
1 parent c3e7d30 commit 8356db2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 5 additions & 3 deletions Scripts/Libs/ahmad3/EventAPI.Script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ Void Private_UpdateEventsCache() {

Void Loop() {
Private_UpdateAuthHeaders();
if (Inner::Loop()) {
Private_UpdateEventsCache();
}
// FIXME: this is too heavy
Inner::Loop();
// if (Inner::Loop()) {
// Private_UpdateEventsCache();
// }
}
4 changes: 1 addition & 3 deletions Scripts/Libs/ahmad3/InnerEventAPI.Script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Boolean EventHasContent(Text _EventHandle) {
if (!G_Events.existskey(_EventHandle) || G_PendingEvents.exists(_EventHandle)) return False;
declare Types::K_Event Event = G_Events[_EventHandle];
// If this event is not pending, at least count its editions amount to be sure it's fully loaded
return !G_HasFailed && Event.EditionsDetails.count > 0;
return !G_HasFailed && Event.Editions.count > 0 && Event.EditionsDetails.count > 0;
}

Types::K_Event[Text] GetEvents() {
Expand Down Expand Up @@ -202,8 +202,6 @@ Boolean Loop() {
}

if (G_EventRequestLoaded) {
G_EventRequestLoaded = False;

foreach (Req in G_PendingEventHandleReqs) {
// If this happens, it's because the request to `/event` didn't return
// an event with the `Handle` event handle. This means that the event is
Expand Down

0 comments on commit 8356db2

Please sign in to comment.