Skip to content

Commit

Permalink
1.0.4 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
nt4f04uNd authored Jul 14, 2021
1 parent e679193 commit 2256a51
Show file tree
Hide file tree
Showing 127 changed files with 14,475 additions and 5,870 deletions.
40 changes: 27 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,47 @@
"version": "0.2.0",
"configurations": [
{
"name": "Flutter Profile",
"name": "dev",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"flutterMode": "profile"
"args": [
// TODO: remove this when intl_translation supports nnbd https://github.com/dart-lang/intl_translation/issues/134
"--no-sound-null-safety"
],
"codeLens": {
"for": [
"run-file",
"debug-file",
"run-test",
"run-test-file",
"debug-test",
"debug-test-file",
],
// TODO: remove this intl_translation supports nnbd
// See also https://github.com/Dart-Code/Dart-Code/issues/3356
"title": "${debugType} (--no-sound-null-safety)"
}
},
{
"name": "Flutter Release",
"name": "profile",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"flutterMode": "release"
},
{
"name": "Flutter Dev",
"type": "dart",
"request": "launch",
"program": "lib/main.dart"
"flutterMode": "profile",
"args": [
"--no-sound-null-safety"
]
},
{
"name": "Flutter Dev (fast-start)",
"name": "release",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"flutterMode": "release",
"args": [
"--fast-start"
"--no-sound-null-safety"
]
},
}
]
}
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.0.4

- Added playlists and artists
- Added more selection actions
- In deletion prompts added a preview of the arts of the content that is being deleted
- Other fixes and cosmetic changes

## 1.0.3

- Fix issue with current song not updated on search route
Expand All @@ -13,7 +20,7 @@
was saved only for the current app session, when it was added, and was not restored.
- Optimized scrollbar and listviews
- Became media browser service, support for Android Auto
- Fixed that album arts were not recahced (below Android 11)
- Fixed that album arts were not recached (below Android 10)
- Refactored a lot of code and fixed a lot of other bugs
- Changed player backend (non-UX)

Expand Down
4 changes: 2 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ linter:
# - avoid_setters_without_getters # not yet tested
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
# - avoid_slow_async_io # DISABLED_BY_ME
- avoid_slow_async_io
- avoid_type_to_string
- avoid_types_as_parameter_names
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
Expand Down Expand Up @@ -187,7 +187,7 @@ linter:
- use_is_even_rather_than_modulo
- use_key_in_widget_constructors
- use_late_for_private_fields_and_variables
# - use_named_constants # not yet tested
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
# - use_setters_to_change_properties # not yet tested
Expand Down
4 changes: 0 additions & 4 deletions android/app/proguard-rules.pro

This file was deleted.

9 changes: 1 addition & 8 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,7 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />

<service
android:name="com.nt4f04und.sweyer.services.MusicService"
android:enabled="true"
android:exported="true"
android:foregroundServiceType="mediaPlayback">
</service>


<service android:name="com.ryanheise.audioservice.AudioService">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService" />
Expand Down
10 changes: 8 additions & 2 deletions android/app/src/main/java/com/nt4f04und/sweyer/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
public class Constants {
public static final String LogTag = "com.nt4f04und.sweyer";

public static final class intents {
public static final int PERMANENT_DELETION_REQUEST = 0;
public enum intents {
FAVORITE_REQUEST(0),
PERMANENT_DELETION_REQUEST(1);

public final int value;
intents(int value) {
this.value = value;
}
}
}
17 changes: 7 additions & 10 deletions android/app/src/main/java/com/nt4f04und/sweyer/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
import android.content.Intent;
import android.os.Bundle;

import com.nt4f04und.sweyer.channels.GeneralChannel;
import androidx.annotation.Nullable;

import com.nt4f04und.sweyer.channels.ContentChannel;
import com.nt4f04und.sweyer.handlers.GeneralHandler;

import androidx.annotation.Nullable;
import com.ryanheise.audioservice.AudioServicePlugin;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugin.common.BinaryMessenger;
import com.ryanheise.audioservice.AudioServicePlugin;

public class MainActivity extends FlutterActivity {

Expand All @@ -27,8 +26,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneralHandler.init(getApplicationContext());
BinaryMessenger messenger = getBinaryMessenger();
GeneralChannel.instance.init(messenger, this);
ContentChannel.instance.init(messenger);
ContentChannel.instance.init(messenger, this);
}

BinaryMessenger getBinaryMessenger() {
Expand All @@ -43,15 +41,14 @@ public FlutterEngine provideFlutterEngine(Context context) {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == Constants.intents.PERMANENT_DELETION_REQUEST) {
// Report deletion intent result on android R
ContentChannel.instance.sendDeletionResult(resultCode == RESULT_OK);
if (requestCode == Constants.intents.PERMANENT_DELETION_REQUEST.value ||
requestCode == Constants.intents.FAVORITE_REQUEST.value) {
ContentChannel.instance.sendResultFromIntent(resultCode == RESULT_OK);
}
}

@Override
protected void onDestroy() {
GeneralChannel.instance.destroy();
ContentChannel.instance.destroy();
super.onDestroy();
}
Expand Down
Loading

0 comments on commit 2256a51

Please sign in to comment.