@gphone/sdk
    Preparing search index...

    Function useReports

    • OS Service Hook for filing and viewing player reports.

      Returns {
          loadPendingReports: () => Promise<void>;
          loadReportHistory: () => Promise<void>;
          pendingReportCount: Readable<number>;
          pendingReports: Writable<Report[]>;
          reopenReport: (id: number) => Promise<void>;
          resolvedReports: Writable<Report[]>;
          resolveReport: (
              id: number,
              action: "moderate" | "dismiss",
          ) => Promise<void>;
      }

      • loadPendingReports: () => Promise<void>
      • loadReportHistory: () => Promise<void>
      • pendingReportCount: Readable<number>

        Drives the home-screen badge. Falls to zero only when the queue empties.

      • pendingReports: Writable<Report[]>

        The moderation queue, and the badge that counts it.

        The count is derived from the pending list rather than being decremented on open. That distinction is the whole point: a report is outstanding until somebody decides about it, so visiting the app must not clear the badge the way opening Mail clears an unread count. Nothing here is marked "seen".

      • reopenReport: (id: number) => Promise<void>

        Undo a decision. Restores hidden content as well as reopening the report.

      • resolvedReports: Writable<Report[]>
      • resolveReport: (id: number, action: "moderate" | "dismiss") => Promise<void>

        Resolve, then re-read both lists so the badge and history agree with the server.