mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-01-13 00:29:27 -05:00
debugging
This commit is contained in:
parent
9e48bc2223
commit
7567a0e3bc
@ -254,7 +254,8 @@ class InviteDialogState extends ConsumerState<InviteDialog> {
|
|||||||
_validInvitation = null;
|
_validInvitation = null;
|
||||||
widget.onValidationFailed();
|
widget.onValidationFailed();
|
||||||
});
|
});
|
||||||
} on Exception catch (_) {
|
} on Exception catch (e) {
|
||||||
|
log.debug('exception: $e', e);
|
||||||
setState(() {
|
setState(() {
|
||||||
_isValidating = false;
|
_isValidating = false;
|
||||||
_validInvitation = null;
|
_validInvitation = null;
|
||||||
|
@ -195,7 +195,11 @@ class MainPagerState extends ConsumerState<MainPager>
|
|||||||
|
|
||||||
// ignore: prefer_expression_function_bodies
|
// ignore: prefer_expression_function_bodies
|
||||||
Widget _onNewChatBottomSheetBuilder(BuildContext context) {
|
Widget _onNewChatBottomSheetBuilder(BuildContext context) {
|
||||||
return const SizedBox(height: 200, child: Center(child: Text("test")));
|
return const SizedBox(
|
||||||
|
height: 200,
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
"Group and custom chat functionality is not available yet")));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _bottomSheetBuilder(BuildContext context) {
|
Widget _bottomSheetBuilder(BuildContext context) {
|
||||||
|
@ -7,6 +7,7 @@ import '../proto/proto.dart' as proto;
|
|||||||
import '../proto/proto.dart' show Contact;
|
import '../proto/proto.dart' show Contact;
|
||||||
|
|
||||||
import '../veilid_support/veilid_support.dart';
|
import '../veilid_support/veilid_support.dart';
|
||||||
|
import '../tools/tools.dart';
|
||||||
import 'account.dart';
|
import 'account.dart';
|
||||||
import 'chat.dart';
|
import 'chat.dart';
|
||||||
|
|
||||||
@ -54,6 +55,8 @@ Future<void> deleteContact(
|
|||||||
final pool = await DHTRecordPool.instance();
|
final pool = await DHTRecordPool.instance();
|
||||||
final accountRecordKey =
|
final accountRecordKey =
|
||||||
activeAccountInfo.userLogin.accountRecordInfo.accountRecord.recordKey;
|
activeAccountInfo.userLogin.accountRecordInfo.accountRecord.recordKey;
|
||||||
|
final localConversationKey =
|
||||||
|
proto.TypedKeyProto.fromProto(contact.localConversationRecordKey);
|
||||||
final remoteConversationKey =
|
final remoteConversationKey =
|
||||||
proto.TypedKeyProto.fromProto(contact.remoteConversationRecordKey);
|
proto.TypedKeyProto.fromProto(contact.remoteConversationRecordKey);
|
||||||
|
|
||||||
@ -80,12 +83,22 @@ Future<void> deleteContact(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await (await pool.openRead(
|
try {
|
||||||
proto.TypedKeyProto.fromProto(contact.localConversationRecordKey),
|
await (await pool.openRead(localConversationKey,
|
||||||
parent: accountRecordKey))
|
parent: accountRecordKey))
|
||||||
.delete();
|
.delete();
|
||||||
await (await pool.openRead(remoteConversationKey, parent: accountRecordKey))
|
} on Exception catch (e) {
|
||||||
|
log.debug('error removing local conversation record key: $e', e);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (localConversationKey != remoteConversationKey) {
|
||||||
|
await (await pool.openRead(remoteConversationKey,
|
||||||
|
parent: accountRecordKey))
|
||||||
.delete();
|
.delete();
|
||||||
|
}
|
||||||
|
} on Exception catch (e) {
|
||||||
|
log.debug('error removing remove conversation record key: $e', e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ Future<AcceptedOrRejectedContact?> checkAcceptRejectContact(
|
|||||||
|
|
||||||
return acceptReject;
|
return acceptReject;
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
log.error('Exception in checkAcceptRejectContact: $e');
|
log.error('Exception in checkAcceptRejectContact: $e', e);
|
||||||
|
|
||||||
// Attempt to clean up. All this needs better lifetime management
|
// Attempt to clean up. All this needs better lifetime management
|
||||||
await deleteContactInvitation(
|
await deleteContactInvitation(
|
||||||
@ -471,7 +471,7 @@ Future<AcceptedContact?> acceptContactInvitation(
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
log.error('exception: $e');
|
log.debug('exception: $e', e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ class LocalAccounts extends _$LocalAccounts
|
|||||||
await eventualVeilid.future;
|
await eventualVeilid.future;
|
||||||
return await load();
|
return await load();
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
log.error('Failed to load LocalAccounts table: $e');
|
log.error('Failed to load LocalAccounts table: $e', e);
|
||||||
return const IListConst([]);
|
return const IListConst([]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class Logins extends _$Logins with AsyncTableDBBacked<ActiveLogins> {
|
|||||||
await eventualVeilid.future;
|
await eventualVeilid.future;
|
||||||
return await load();
|
return await load();
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
log.error('Failed to load ActiveLogins table: $e');
|
log.error('Failed to load ActiveLogins table: $e', e);
|
||||||
return const ActiveLogins(userLogins: IListConst([]));
|
return const ActiveLogins(userLogins: IListConst([]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,8 @@ export 'loggy.dart';
|
|||||||
export 'phono_byte.dart';
|
export 'phono_byte.dart';
|
||||||
export 'radix_generator.dart';
|
export 'radix_generator.dart';
|
||||||
export 'responsive.dart';
|
export 'responsive.dart';
|
||||||
|
export 'scanner_error_widget.dart';
|
||||||
export 'secret_crypto.dart';
|
export 'secret_crypto.dart';
|
||||||
export 'state_logger.dart';
|
export 'state_logger.dart';
|
||||||
export 'theme_service.dart';
|
export 'theme_service.dart';
|
||||||
export 'widget_helpers.dart';
|
export 'widget_helpers.dart';
|
||||||
export 'scanner_error_widget.dart';
|
|
||||||
|
Loading…
Reference in New Issue
Block a user