Breeze reads the account's picture from its node through Entity's shared reader, on connecting and every ten minutes, and takes it with Entity's rule: a picture chosen here that the node has not accepted yet stays. The taken picture is saved as already published, so it is not sent back. Entity is pinned at the reader; the lock also follows Kryon master.
29 lines
1.6 KiB
Ziran
29 lines
1.6 KiB
Ziran
#import, file "../src/app/profile_picture_policy.zi";
|
|
|
|
#program_export
|
|
Answer :: () -> s32 {
|
|
if ProfilePictureCount != 25 { return 1 }
|
|
if ProfilePictureDefault() != 41 { return 2 }
|
|
if ProfilePictureAt(20) != 61 || ProfilePictureAt(21) != 124 ||
|
|
ProfilePictureAt(22) != 125 || ProfilePictureAt(23) != 126 ||
|
|
ProfilePictureAt(24) != 65 { return 3 }
|
|
if ProfilePictureAt(-1) != 0 || ProfilePictureAt(25) != 0 { return 4 }
|
|
if ProfilePictureValid(62) || ProfilePictureValid(91) ||
|
|
!ProfilePictureValid(55) || !ProfilePictureValid(126) { return 5 }
|
|
if ProfilePictureSelected(126) != 126 ||
|
|
ProfilePictureSelected(999) != 41 { return 6 }
|
|
if !ProfilePictureValid(127) || !ProfilePictureValid(129) || ProfilePictureValid(130) ||
|
|
ProfilePictureSelected(128) != 128 { return 7 }
|
|
if ProfilePictureEarlierChoice(55, 47) != 55 || ProfilePictureEarlierChoice(128, 47) != 128 ||
|
|
ProfilePictureEarlierChoice(47, 47) != 0 || ProfilePictureEarlierChoice(41, 47) != 0 ||
|
|
ProfilePictureEarlierChoice(999, 47) != 0 || ProfilePictureEarlierChoice(-1, 47) != 0 { return 8 }
|
|
// A picture chosen in another app shows in Breeze's own profile.
|
|
if ProfilePictureFromNode(128, 47, false) != 128 || ProfilePictureFromNode(55, 47, false) != 55 { return 9 }
|
|
// A choice here still on its way to the node is kept.
|
|
if ProfilePictureFromNode(128, 55, true) != 0 { return 10 }
|
|
// The same picture, no picture, or one Breeze does not offer changes nothing.
|
|
if ProfilePictureFromNode(55, 55, false) != 0 || ProfilePictureFromNode(0, 55, false) != 0 ||
|
|
ProfilePictureFromNode(62, 55, false) != 0 { return 11 }
|
|
return 42
|
|
}
|