Skip to content

Commit

Permalink
fix redirect to details after accept request create new
Browse files Browse the repository at this point in the history
  • Loading branch information
LGro committed May 26, 2024
1 parent 132d7d6 commit 66a684d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/data/providers/distributed_storage/dht.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class VeilidDhtStorage extends DistributedStorage {
}

if (contact.sharedProfile != null) {
// TODO: Handle VeilidAPIExceptionKeyNotFound
await updatePasswordEncryptedDHTRecord(
recordKey: contact.dhtSettingsForSharing!.key,
recordWriter: contact.dhtSettingsForSharing!.writer!,
Expand Down
5 changes: 3 additions & 2 deletions lib/ui/receive_request/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';

import '../../data/models/coag_contact.dart';
import '../../data/repositories/contacts.dart';
Expand All @@ -26,8 +27,8 @@ class ReceiveRequestPage extends StatelessWidget {
child: BlocConsumer<ReceiveRequestCubit, ReceiveRequestState>(
listener: (context, state) async {
if (state.status.isSuccess) {
await Navigator.of(context).pushReplacementNamed('contactDetails',
arguments: {'coagContactId': state.profile!.coagContactId});
context.goNamed('contactDetails',
pathParameters: {'coagContactId': state.profile!.coagContactId});
}
}, builder: (context, state) {
switch (state.status) {
Expand Down

0 comments on commit 66a684d

Please sign in to comment.