-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from andannn/avtivity_function
Avtivity function
- Loading branch information
Showing
93 changed files
with
4,256 additions
and
376 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Generated file. | ||
// | ||
// If you wish to remove Flutter's multidex support, delete this entire file. | ||
// | ||
// Modifications to this file should be done in a copy under a different name | ||
// as this file may be regenerated. | ||
|
||
package io.flutter.app; | ||
|
||
import android.app.Application; | ||
import android.content.Context; | ||
import androidx.annotation.CallSuper; | ||
import androidx.multidex.MultiDex; | ||
|
||
/** | ||
* Extension of {@link android.app.Application}, adding multidex support. | ||
*/ | ||
public class FlutterMultiDexApplication extends Application { | ||
@Override | ||
@CallSuper | ||
protected void attachBaseContext(Context base) { | ||
super.attachBaseContext(base); | ||
MultiDex.install(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'activity_filter_type.g.dart'; | ||
|
||
@JsonEnum(alwaysCreate: true) | ||
enum ActivityFilterType { | ||
/// no filter. | ||
@JsonValue('ALL') | ||
all, | ||
|
||
/// only test activity. | ||
@JsonValue('TEXT') | ||
text, | ||
|
||
/// only list activity | ||
@JsonValue('LIST') | ||
list; | ||
|
||
String toJson() => _$ActivityFilterTypeEnumMap[this]!; | ||
|
||
factory ActivityFilterType.fromJson(String json) => | ||
_$ActivityFilterTypeEnumMap | ||
.map((key, value) => MapEntry(value, key))[json]!; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'activity_scope_category.g.dart'; | ||
|
||
@JsonEnum(alwaysCreate: true) | ||
enum ActivityScopeCategory { | ||
/// show activities of all users.. | ||
@JsonValue('GLOBAL') | ||
global, | ||
|
||
/// show activities of following users. | ||
@JsonValue('FOLLOWING') | ||
following; | ||
|
||
String toJson() => _$ActivityScopeCategoryEnumMap[this]!; | ||
|
||
factory ActivityScopeCategory.fromJson(String json) => | ||
_$ActivityScopeCategoryEnumMap | ||
.map((key, value) => MapEntry(value, key))[json]!; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'activity_type.g.dart'; | ||
|
||
/// Bangumi releasing season. | ||
@JsonEnum(alwaysCreate: true) | ||
enum ActivityType { | ||
/// A text activity | ||
@JsonValue('TEXT') | ||
text, | ||
|
||
/// A anime list update activity | ||
@JsonValue('ANIME_LIST') | ||
animeList, | ||
|
||
/// A manga list update activity | ||
@JsonValue('MANGA_LIST') | ||
mangaList, | ||
|
||
/// A text message activity sent to another user | ||
@JsonValue('MESSAGE') | ||
message, | ||
|
||
/// Anime & Manga list update, only used in query arguments | ||
@JsonValue('MEDIA_LIST') | ||
mediaList; | ||
|
||
String toJson() => _$ActivityTypeEnumMap[this]!; | ||
|
||
factory ActivityType.fromJson(String json) => | ||
_$ActivityTypeEnumMap.map((key, value) => MapEntry(value, key))[json]!; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import 'package:aniflow/core/common/model/activity_filter_type.dart'; | ||
import 'package:aniflow/core/common/model/activity_scope_category.dart'; | ||
|
||
extension ActivityTypeEx on (ActivityFilterType, ActivityScopeCategory) { | ||
String get combineJsonKey => '${this.$1.toJson()}_${this.$2.toJson()}'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
import 'package:flutter/cupertino.dart'; | ||
|
||
extension IntValueNotifierEx on ValueNotifier<int> { | ||
void notifyChanged() { | ||
value = value++; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.