mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 07:02:12 +00:00
fix manual approval issues and increase default threshold
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
697e9a99f8
commit
ed0b7160b9
3 changed files with 4 additions and 3 deletions
|
|
@ -104,10 +104,10 @@ Future<void> incFlameCounter(
|
||||||
contact.userId,
|
contact.userId,
|
||||||
ContactsCompanion(
|
ContactsCompanion(
|
||||||
mediaReceivedCounter: Value(
|
mediaReceivedCounter: Value(
|
||||||
contacts.first.mediaReceivedCounter + (received ? 1 : 0),
|
contact.mediaReceivedCounter + (received ? 1 : 0),
|
||||||
),
|
),
|
||||||
mediaSendCounter: Value(
|
mediaSendCounter: Value(
|
||||||
contacts.first.mediaSendCounter + (received ? 0 : 1),
|
contact.mediaSendCounter + (received ? 0 : 1),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ class UserDiscoveryService {
|
||||||
|
|
||||||
static bool shouldRequestManualApproval(Contact c) {
|
static bool shouldRequestManualApproval(Contact c) {
|
||||||
final u = userService.currentUser;
|
final u = userService.currentUser;
|
||||||
|
if (!c.accepted || c.blocked) return false;
|
||||||
if (!u.isUserDiscoveryEnabled) return false;
|
if (!u.isUserDiscoveryEnabled) return false;
|
||||||
if (c.mediaSendCounter < u.requiredSendImages) return false;
|
if (c.mediaSendCounter < u.requiredSendImages) return false;
|
||||||
if (c.userDiscoveryExcluded) return false;
|
if (c.userDiscoveryExcluded) return false;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class UserDiscoverySetupState {
|
||||||
this.isUserDiscoveryEnabled = true,
|
this.isUserDiscoveryEnabled = true,
|
||||||
this.sharePromotion = true,
|
this.sharePromotion = true,
|
||||||
this.isManualApprovalEnabled = false,
|
this.isManualApprovalEnabled = false,
|
||||||
this.threshold = 2,
|
this.threshold = 3,
|
||||||
this.requiredSendImages = 4,
|
this.requiredSendImages = 4,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue