fix manual approval issues and increase default threshold
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run

This commit is contained in:
otsmr 2026-05-14 13:54:06 +02:00
parent 697e9a99f8
commit ed0b7160b9
3 changed files with 4 additions and 3 deletions

View file

@ -104,10 +104,10 @@ Future<void> incFlameCounter(
contact.userId,
ContactsCompanion(
mediaReceivedCounter: Value(
contacts.first.mediaReceivedCounter + (received ? 1 : 0),
contact.mediaReceivedCounter + (received ? 1 : 0),
),
mediaSendCounter: Value(
contacts.first.mediaSendCounter + (received ? 0 : 1),
contact.mediaSendCounter + (received ? 0 : 1),
),
),
);

View file

@ -66,6 +66,7 @@ class UserDiscoveryService {
static bool shouldRequestManualApproval(Contact c) {
final u = userService.currentUser;
if (!c.accepted || c.blocked) return false;
if (!u.isUserDiscoveryEnabled) return false;
if (c.mediaSendCounter < u.requiredSendImages) return false;
if (c.userDiscoveryExcluded) return false;

View file

@ -30,7 +30,7 @@ class UserDiscoverySetupState {
this.isUserDiscoveryEnabled = true,
this.sharePromotion = true,
this.isManualApprovalEnabled = false,
this.threshold = 2,
this.threshold = 3,
this.requiredSendImages = 4,
});