Skip to content

Commit

Permalink
Merge pull request #3 from ConcenTech/0.3.0
Browse files Browse the repository at this point in the history
0.3.0
  • Loading branch information
KevMCarp authored Oct 15, 2024
2 parents 63bf4da + 831ef1d commit 50ed893
Show file tree
Hide file tree
Showing 106 changed files with 6,403 additions and 1,011 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"cSpell.words": [
"activ",
"bitsdojo",
"blurhash",
"Chewie",
"cupertino",
"dont",
"Elems",
"Exif",
"Fullscreen",
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.3.0] - 15/10/2024

### Added

- Activity.
Users can now view and reply to likes and comments.
- Background sync.
Android and iOS only for now.

### Changed

- Moved away from bitsdojo_window package onto the window-manager package.
This allows us to have better control over the window and fix the buggy double click to maximise.

### Fixed
- App bar unable to hide on mobile platforms.
- App attempts to validate token when launched even if not signed in.

## [0.2.1] - 20/09/2024

### Added
Expand All @@ -27,3 +46,4 @@ Now, when the user attempts to navigate back, the image scale is first reset the


[0.2.1]: https://github.com/ConcenTech/album_share/compare/main...0.2.1
[0.3.0]: https://github.com/ConcenTech/album_share/compare/0.2.1...0.3.0
6 changes: 4 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ if (keystorePropertiesFile.exists()) {
android {
namespace "com.concentech.album_share"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileSdk 35

compileOptions {
coreLibraryDesugaringEnabled true // flutter_local_notifications
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand All @@ -51,7 +52,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down Expand Up @@ -84,5 +85,6 @@ flutter {
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
implementation("com.google.android.material:material:1.12.0")
}
6 changes: 5 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
tools:replace="android:label"
android:label="Album Share"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
Expand Down Expand Up @@ -32,6 +34,8 @@
</application>

<uses-permission android:name="android.permission.INTERNET" />
<!-- <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility?hl=en and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
Expand Down
6 changes: 6 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ allprojects {
repositories {
google()
mavenCentral()
maven { url "${project(':background_fetch').projectDir}/libs" }
}
}

Expand All @@ -16,3 +17,8 @@ subprojects {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

rootProject.ext {
compileSdkVersion = 33 // or higher / as desired
targetSdkVersion = 33 // or higher / as desired
}
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Fri Oct 04 20:57:47 BST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "com.android.application" version '8.7.0' apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

Expand Down
3 changes: 3 additions & 0 deletions ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import Flutter
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
102 changes: 55 additions & 47 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
@@ -1,51 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Album Share</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>album_share</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIStatusBarHidden</key>
<false/>
</dict>
<dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.transistorsoft.fetch</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Album Share</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>album_share</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
48 changes: 40 additions & 8 deletions lib/core/components/app_snackbar.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
import 'package:album_share/core/components/scaffold/app_scaffold.dart';
import 'package:another_flushbar/flushbar.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../utils/app_localisations.dart';

class AppSnackbar {
static Future<void> info({
required BuildContext context,
required String message,
String? title,
Widget? image,
VoidCallback? onClick,
}) {
return _baseFlushbar(
context: context,
title: title,
message: message,
icon: image,
onTap: onClick,
color: Colors.blue,
showExtended: false,
);
}

static Future<void> success({
required BuildContext context,
required String message,
Expand All @@ -13,6 +32,7 @@ class AppSnackbar {
}) {
final color = Colors.green.shade300;
return _baseFlushbar(
context: context,
title: AppLocalizations.of(context)!.success,
message: message,
icon: Icon(
Expand All @@ -21,7 +41,7 @@ class AppSnackbar {
),
color: color,
showExtended: showExtended,
).show(context);
);
}

static Future<void> warning({
Expand All @@ -37,7 +57,8 @@ class AppSnackbar {

final color = Colors.red.shade300;

await _baseFlushbar(
return _baseFlushbar(
context: context,
title: error != null ? message : null,
message: error ?? message,
icon: Icon(
Expand All @@ -47,15 +68,17 @@ class AppSnackbar {
),
color: color,
showExtended: showExtended,
).show(context);
);
}

static Flushbar _baseFlushbar({
static Future<dynamic> _baseFlushbar({
required BuildContext context,
required String? title,
required String message,
required Icon icon,
required Color color,
Widget? icon,
Color? color,
required bool showExtended,
VoidCallback? onTap,
}) {
return Flushbar(
title: title,
Expand All @@ -67,7 +90,16 @@ class AppSnackbar {
maxWidth: 1000,
borderRadius: BorderRadius.circular(10),
flushbarPosition: FlushbarPosition.TOP,
margin: const EdgeInsets.all(8),
);
margin: const EdgeInsets.all(8.0),
positionOffset: AppScaffold.appBarHeight(context),
titleSize: 12,
messageSize: 10,
onTap: onTap == null
? null
: (bar) {
onTap();
bar.dismiss();
},
).show(context);
}
}
Loading

0 comments on commit 50ed893

Please sign in to comment.