Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ android {
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

// Set the base name for APK files
setProperty("archivesBaseName", "whitenoise")

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ android-build:
@echo "✔︎ Running a precommit check..."
just precommit
@echo "🎁 Building unversioned android release..."
./scripts/build.sh --full --versioned
./scripts/build.sh --full --android
@echo "🎉 Unversioned android release built successfully!"

# Check and build versioned release
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/chat/chat_info/dm_chat_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class _DMChatInfoState extends ConsumerState<DMChatInfo> {
ClipboardUtils.copyWithToast(
ref: ref,
textToCopy: npub,
successMessage: 'Public Key copied.',
successMessage: 'Public key copied',
noTextMessage: 'No public key to copy',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class _GroupMemberBottomSheetState extends ConsumerState<GroupMemberBottomSheet>
ClipboardUtils.copyWithToast(
ref: ref,
textToCopy: npub,
successMessage: 'Public Key copied.',
successMessage: 'Public key copied',
noTextMessage: 'No public key to copy',
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/contact_list/widgets/user_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class UserProfile extends StatelessWidget {
ClipboardUtils.copyWithToast(
ref: ref,
textToCopy: pubkey,
successMessage: 'Public Key copied.',
successMessage: 'Public key copied',
);
}

Expand Down
7 changes: 4 additions & 3 deletions lib/ui/settings/donate/donate_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import 'package:whitenoise/utils/clipboard_utils.dart';
class DonateScreen extends ConsumerWidget {
const DonateScreen({super.key});

void _copyToClipboard(WidgetRef ref, String text) {
void _copyToClipboard(WidgetRef ref, String type, String text) {
ClipboardUtils.copyWithToast(
ref: ref,
textToCopy: text,
successMessage: 'Copied address to clipboard',
successMessage: 'Copied $type address',
);
}

Expand Down Expand Up @@ -105,7 +105,7 @@ class DonateScreen extends ConsumerWidget {
),
Gap(4.w),
WnIconButton(
onTap: () => _copyToClipboard(ref, kLightningAddress),
onTap: () => _copyToClipboard(ref, 'lightning', kLightningAddress),
iconPath: AssetsPaths.icCopy,
size: 56.h,
padding: 20.w,
Expand Down Expand Up @@ -137,6 +137,7 @@ class DonateScreen extends ConsumerWidget {
onTap:
() => _copyToClipboard(
ref,
'bitcoin',
kBitcoinAddress,
),
iconPath: AssetsPaths.icCopy,
Expand Down
71 changes: 33 additions & 38 deletions lib/ui/settings/network/widgets/relay_expansion_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,49 +74,44 @@ class _RelayExpansionTileState extends ConsumerState<RelayExpansionTile> {

@override
Widget build(BuildContext context) {
return ExpansionTile(
initiallyExpanded: true,
tilePadding: EdgeInsets.zero,
childrenPadding: EdgeInsets.zero,
showTrailingIcon: false,
shape: const Border(),
collapsedShape: const Border(),
title: Row(
children: [
Text(
widget.title,
style: TextStyle(
color: context.colors.mutedForeground,
fontWeight: FontWeight.w600,
fontSize: 16.w,
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Header row (previously the ExpansionTile title)
Row(
children: [
Text(
widget.title,
style: TextStyle(
color: context.colors.mutedForeground,
fontWeight: FontWeight.w600,
fontSize: 16.w,
),
),
),
Gap(8.w),
if (widget.onInfoTap != null)
Gap(8.w),
if (widget.onInfoTap != null)
InkWell(
key: widget.helpIconKey,
onTap: widget.onInfoTap,
child: WnImage(
AssetsPaths.icHelp,
color: context.colors.mutedForeground,
size: 18.w,
),
),
const Spacer(),
InkWell(
key: widget.helpIconKey,
onTap: widget.onInfoTap,
onTap: _showAddRelayBottomSheet,
child: WnImage(
AssetsPaths.icHelp,
color: context.colors.mutedForeground,

size: 18.w,
AssetsPaths.icAdd,
color: context.colors.primary,
size: 23.w,
),
),
const Spacer(),
InkWell(
onTap: _showAddRelayBottomSheet,
child: WnImage(
AssetsPaths.icAdd,
color: context.colors.primary,

size: 23.w,
),
),
],
),

children: [
],
),
Gap(12.h), // Add some spacing between header and content
// Content (previously the ExpansionTile children)
if (widget.relayState.isLoading)
const Center(child: CircularProgressIndicator())
else if (widget.relayState.error != null)
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/settings/profile/share_profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class _ShareProfileScreenState extends ConsumerState<ShareProfileScreen> {
ClipboardUtils.copyWithToast(
ref: ref,
textToCopy: text,
successMessage: 'Public Key copied.',
successMessage: 'Public key copied',
);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/ui/settings/profile_keys/profile_keys_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class _ProfileKeysScreenState extends ConsumerState<ProfileKeysScreen> {
ClipboardUtils.copyWithToast(
ref: ref,
textToCopy: npub,
successMessage: 'Public key copied to clipboard',
successMessage: 'Public key copied',
);
}

Expand All @@ -50,7 +50,7 @@ class _ProfileKeysScreenState extends ConsumerState<ProfileKeysScreen> {
await ClipboardUtils.copySensitiveWithToast(
ref: ref,
textToCopy: nsec,
successMessage: 'Private key copied to clipboard',
successMessage: 'Private key copied',
);
}
}
Expand Down
19 changes: 12 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,13 @@ BUILD_NUMBER=$(echo "$FULL_VERSION" | cut -d'+' -f2)
print_info "Version: $VERSION_NAME"
print_info "Build Number: $BUILD_NUMBER"

# Set up output directory
# Set up output directory path (but don't create it yet - wait until after cleaning)
if [ "$VERSIONED_OUTPUT" = true ]; then
if [ -n "$CUSTOM_OUTPUT_DIR" ]; then
OUTPUT_DIR="$CUSTOM_OUTPUT_DIR"
else
OUTPUT_DIR="build/releases/v$VERSION_NAME"
fi
mkdir -p "$OUTPUT_DIR"
print_info "Output Directory: $OUTPUT_DIR"
fi

Expand Down Expand Up @@ -273,6 +272,12 @@ else
flutter clean
fi

# Create output directory now (after cleaning)
if [ "$VERSIONED_OUTPUT" = true ]; then
mkdir -p "$OUTPUT_DIR"
print_success "Created output directory: $OUTPUT_DIR"
fi

# Get dependencies
print_step "📦 Getting dependencies"
flutter pub get
Expand Down Expand Up @@ -337,9 +342,9 @@ if [ "$BUILD_ANDROID" = true ]; then
flutter build apk --split-per-abi --release

# Handle output files
ARM64_APK_PATH="build/app/outputs/flutter-apk/app-arm64-v8a-release.apk"
ARMV7_APK_PATH="build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk"
X86_64_APK_PATH="build/app/outputs/flutter-apk/app-x86_64-release.apk"
ARM64_APK_PATH="build/app/outputs/flutter-apk/whitenoise-arm64-v8a-release.apk"
ARMV7_APK_PATH="build/app/outputs/flutter-apk/whitenoise-armeabi-v7a-release.apk"
X86_64_APK_PATH="build/app/outputs/flutter-apk/whitenoise-x86_64-release.apk"

# Generate SHA-256 hashes
print_step "🔐 Generating SHA-256 hashes"
Expand Down Expand Up @@ -433,8 +438,8 @@ if [ "$BUILD_ANDROID" = true ]; then
else
flutter build apk --split-per-abi --debug --verbose

ARM64_DEBUG_APK="build/app/outputs/flutter-apk/app-arm64-v8a-debug.apk"
ARMV7_DEBUG_APK="build/app/outputs/flutter-apk/app-armeabi-v7a-debug.apk"
ARM64_DEBUG_APK="build/app/outputs/flutter-apk/whitenoise-arm64-v8a-debug.apk"
ARMV7_DEBUG_APK="build/app/outputs/flutter-apk/whitenoise-armeabi-v7a-debug.apk"

# Generate SHA-256 hashes for debug builds
print_step "🔐 Generating SHA-256 hashes for debug builds"
Expand Down