JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MessageTextView Class Reference

A rounded, gradient-filled board that shows a title, a scrollable message body, and an Agree button, fading itself in and out. More...

#include <MessageTextView.h>

Inheritance diagram for MessageTextView:
Collaboration diagram for MessageTextView:

Instance Methods

(instancetype) - init:title:url:send:
 Builds the board and kicks off a signed download of its body text.
(instancetype) - init:title:message:
 Builds the board immediately from a title and a ready message body.
(void) - sendErrorDelegate:
 Forwards a download failure to the delegate, if it responds.
(void) - downloaderFinished:
 Handles a completed download: builds the board, closes on a stale-client status, or reports the error.
(void) - downloaderError:
 Handles a failed download by reporting a nil error to the delegate.
(void) - downloaderProceed:
 Progress callback; does nothing.
(void) - displayMessage:
 Displays a message; does nothing.
(void) - createMessageBoard:
 Lays out the whole board: the gradient paper, the title label, the scrollable body text view, and the Agree button, then fades them in.
(void) - pushAgree:
 The Agree button action: fades the board out and notifies the delegate it has closed.

Class Methods

(Class) + layerClass
 The backing layer class, a CAGradientLayer so the board can host its paper gradient.

Detailed Description

A rounded, gradient-filled board that shows a title, a scrollable message body, and an Agree button, fading itself in and out.

Method Documentation

◆ createMessageBoard:

- (void) createMessageBoard: (nullable id) message

Lays out the whole board: the gradient paper, the title label, the scrollable body text view, and the Agree button, then fades them in.

Parameters
messageThe body text shown in the text view.
Ghidra address:
0xfb1e0

◆ displayMessage:

- (void) displayMessage: (nullable id) message

Displays a message; does nothing.

Parameters
messageThe message.
Ghidra address:
0xfb1dc

◆ downloaderError:

- (void) downloaderError: (nullable id) downloader

Handles a failed download by reporting a nil error to the delegate.

Parameters
downloaderThe failed request.
Ghidra address:
0xfb1c8

◆ downloaderFinished:

- (void) downloaderFinished: (nullable id) downloader

Handles a completed download: builds the board, closes on a stale-client status, or reports the error.

Reads the JSON body: status 0 lays the board out with the policy text; status 100011 (a client too old to continue) closes the board and shows the update alert; any other status or a missing status reports the err_message (or a localized fallback) to the delegate.

Parameters
downloaderThe finished request.
Ghidra address:
0xfaf58

◆ downloaderProceed:

- (void) downloaderProceed: (nullable id) downloader

Progress callback; does nothing.

Parameters
downloaderThe request.
Ghidra address:
0xfb1d8

◆ init:title:message:

- (instancetype) init: (nullable id< MessageTextViewDelegate >) delegate
title: (nullable NSString *) title
message: (nullable id) message 

Builds the board immediately from a title and a ready message body.

Stores delegate weakly and title as the board title, then lays the board out at once with message as the body text.

Parameters
delegateThe object told when the board closes. Held weakly.
titleThe board's title text.
messageThe body text.
Returns
The initialised board.
Ghidra address:
0xfad40

◆ init:title:url:send:

- (instancetype) init: (nullable id< MessageTextViewDelegate >) delegate
title: (nullable NSString *) title
url: (nullable NSURL *) url
send: (nullable NSDictionary *) send 

Builds the board and kicks off a signed download of its body text.

Stores delegate weakly and title as the board title, then opens a SessionDownloader against url with send as the POST body and starts it; the board is laid out later from -downloaderFinished: .

Parameters
delegateThe object told when the board closes or the download fails. Held weakly.
titleThe board's title text.
urlThe endpoint the body text is fetched from.
sendThe POST parameters.
Returns
The initialised board.
Ghidra address:
0xfab78

◆ layerClass

+ (Class) layerClass

The backing layer class, a CAGradientLayer so the board can host its paper gradient.

Returns
CAGradientLayer 's class.
Ghidra address:
0xfab64
Ghidra address:
0xfab64

◆ pushAgree:

- (void) pushAgree: (nullable id) sender

The Agree button action: fades the board out and notifies the delegate it has closed.

Parameters
senderThe Agree button.
Ghidra address:
0xfbc98

◆ sendErrorDelegate:

- (void) sendErrorDelegate: (nullable NSString *) msgStr

Forwards a download failure to the delegate, if it responds.

Parameters
msgStrThe error text passed on to the delegate.
Ghidra address:
0xfaeb0

The documentation for this class was generated from the following files: