Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[auth] changes to display new icon on code_widget

Aman Rajff41f1c7f84f
diff --git a/auth/lib/ui/code_widget.dart b/auth/lib/ui/code_widget.dart
index 8a09e4b0c3..5f2bdf9d70 100644
--- a/auth/lib/ui/code_widget.dart
+++ b/auth/lib/ui/code_widget.dart
@@ -442,13 +442,19 @@ class _CodeWidgetState extends State<CodeWidget> {
}
Widget _getIcon() {
+ final String iconData;
+ if (widget.code.display.isCustomIcon) {
+ iconData = widget.code.display.customIconData;
+ } else {
+ iconData = widget.code.issuer;
+ }
return Padding(
padding: _shouldShowLargeIcon
? EdgeInsets.only(left: widget.isCompactMode ? 12 : 16)
: const EdgeInsets.all(0),
child: IconUtils.instance.getIcon(
context,
- safeDecode(widget.code.issuer).trim(),
+ safeDecode(iconData).trim(),
width: widget.isCompactMode
? (_shouldShowLargeIcon ? 32 : 24)
: (_shouldShowLargeIcon ? 42 : 24),