mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-13 06:11:43 +08:00
@@ -1,29 +1,21 @@
|
|||||||
package com.example.piliplus
|
package com.example.piliplus
|
||||||
|
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.app.PictureInPictureParams
|
|
||||||
import android.app.SearchManager
|
import android.app.SearchManager
|
||||||
import android.content.ComponentName
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.content.pm.ShortcutInfo
|
import android.content.pm.ShortcutInfo
|
||||||
import android.content.pm.ShortcutManager
|
import android.content.pm.ShortcutManager
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.graphics.Point
|
|
||||||
import android.graphics.drawable.Icon
|
import android.graphics.drawable.Icon
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.view.WindowManager.LayoutParams
|
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import com.ryanheise.audioservice.AudioServiceActivity
|
import com.ryanheise.audioservice.AudioServiceActivity
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
import io.flutter.embedding.engine.FlutterEngine
|
||||||
import io.flutter.plugin.common.MethodChannel
|
import io.flutter.plugin.common.MethodChannel
|
||||||
import kotlin.math.roundToInt
|
|
||||||
import kotlin.system.exitProcess
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
class MainActivity : AudioServiceActivity() {
|
class MainActivity : AudioServiceActivity() {
|
||||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||||
@@ -32,7 +24,7 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
val methodChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "PiliPlus")
|
val methodChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "PiliPlus")
|
||||||
methodChannel.setMethodCallHandler { call, result ->
|
methodChannel.setMethodCallHandler { call, result ->
|
||||||
when (call.method) {
|
when (call.method) {
|
||||||
"back" -> back();
|
"back" -> back()
|
||||||
|
|
||||||
"linkVerifySettings" -> {
|
"linkVerifySettings" -> {
|
||||||
val uri = ("package:" + context.packageName).toUri()
|
val uri = ("package:" + context.packageName).toUri()
|
||||||
@@ -119,7 +111,7 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
pendingIntent.intentSender
|
pendingIntent.intentSender
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (_: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -382,10 +382,10 @@ abstract final class UserHttp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<LoadingState<double?>> getCoin() async {
|
static Future<LoadingState<double>> getCoin() async {
|
||||||
final res = await Request.get(Api.getCoin);
|
final res = await Request.get(Api.getCoin);
|
||||||
if (res.data['code'] == 0) {
|
if (res.data['code'] == 0) {
|
||||||
return Success((res.data['data']?['money'] as num?)?.toDouble());
|
return Success((res.data['data']?['money'] as num?)?.toDouble() ?? 0.0);
|
||||||
} else {
|
} else {
|
||||||
return Error(res.data['message']);
|
return Error(res.data['message']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class UserInfoData {
|
|||||||
: null;
|
: null;
|
||||||
mid = json['mid'];
|
mid = json['mid'];
|
||||||
mobileVerified = json['mobile_verified'];
|
mobileVerified = json['mobile_verified'];
|
||||||
money = json['money'] is int ? json['money'].toDouble() : json['money'];
|
money = (json['money'] as num?)?.toDouble() ?? 0.0;
|
||||||
moral = json['moral'];
|
moral = json['moral'];
|
||||||
official = json['official'];
|
official = json['official'];
|
||||||
officialVerify = json['officialVerify'];
|
officialVerify = json['officialVerify'];
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: kFloatingActionButtonMargin,
|
right: padding.right + kFloatingActionButtonMargin,
|
||||||
bottom: padding.bottom + kFloatingActionButtonMargin,
|
bottom: padding.bottom + kFloatingActionButtonMargin,
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class _FavNoteChildPageState extends State<FavNoteChildPage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
final padding = MediaQuery.viewPaddingOf(context);
|
final padding = MediaQuery.viewPaddingOf(context).copyWith(top: 0);
|
||||||
final bottomH = 50 + padding.bottom;
|
final bottomH = 50 + padding.bottom;
|
||||||
return Stack(
|
return Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class _FavPgcChildPageState extends State<FavPgcChildPage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
final padding = MediaQuery.viewPaddingOf(context);
|
final padding = MediaQuery.viewPaddingOf(context).copyWith(top: 0);
|
||||||
final bottomH = 50 + padding.bottom;
|
final bottomH = 50 + padding.bottom;
|
||||||
return Stack(
|
return Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class _FavDetailPageState extends State<FavDetailPage> with GridMixin {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: padding.right,
|
||||||
bottom: padding.bottom + kFloatingActionButtonMargin,
|
bottom: padding.bottom + kFloatingActionButtonMargin,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const .only(right: kFloatingActionButtonMargin),
|
padding: const .only(right: kFloatingActionButtonMargin),
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class _LaterPageState extends State<LaterPage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final padding = MediaQuery.viewPaddingOf(context);
|
||||||
return Obx(
|
return Obx(
|
||||||
() {
|
() {
|
||||||
final enableMultiSelect = _baseCtr.enableMultiSelect.value;
|
final enableMultiSelect = _baseCtr.enableMultiSelect.value;
|
||||||
@@ -119,10 +120,8 @@ class _LaterPageState extends State<LaterPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: padding.right,
|
||||||
bottom:
|
bottom: padding.bottom + kFloatingActionButtonMargin,
|
||||||
MediaQuery.viewPaddingOf(context).bottom +
|
|
||||||
kFloatingActionButtonMargin,
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const .only(right: kFloatingActionButtonMargin),
|
padding: const .only(right: kFloatingActionButtonMargin),
|
||||||
child: Obx(
|
child: Obx(
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:PiliPlus/plugin/pl_player/widgets/common_btn.dart';
|
|||||||
import 'package:PiliPlus/plugin/pl_player/widgets/play_pause_btn.dart';
|
import 'package:PiliPlus/plugin/pl_player/widgets/play_pause_btn.dart';
|
||||||
import 'package:PiliPlus/utils/storage.dart';
|
import 'package:PiliPlus/utils/storage.dart';
|
||||||
import 'package:PiliPlus/utils/storage_key.dart';
|
import 'package:PiliPlus/utils/storage_key.dart';
|
||||||
|
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -69,7 +70,7 @@ class _BottomControlState extends State<BottomControl> with HeaderMixin {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (liveRoomCtr.isLogin) {
|
if (kDebugMode || liveRoomCtr.isLogin) {
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/liveDmBlockPage',
|
'/liveDmBlockPage',
|
||||||
parameters: {
|
parameters: {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class _MainReplyPageState extends State<MainReplyPage>
|
|||||||
position: fabAnimation,
|
position: fabAnimation,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: .only(
|
padding: .only(
|
||||||
right: kFloatingActionButtonMargin,
|
right: padding.right + kFloatingActionButtonMargin,
|
||||||
bottom: padding.bottom + kFloatingActionButtonMargin,
|
bottom: padding.bottom + kFloatingActionButtonMargin,
|
||||||
),
|
),
|
||||||
child: FloatingActionButton(
|
child: FloatingActionButton(
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class _MatchInfoPageState extends CommonDynPageState<MatchInfoPage> {
|
|||||||
position: fabAnimation,
|
position: fabAnimation,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: .only(
|
padding: .only(
|
||||||
right: kFloatingActionButtonMargin,
|
right: padding.right + kFloatingActionButtonMargin,
|
||||||
bottom: padding.bottom + kFloatingActionButtonMargin,
|
bottom: padding.bottom + kFloatingActionButtonMargin,
|
||||||
),
|
),
|
||||||
child: replyButton,
|
child: replyButton,
|
||||||
|
|||||||
@@ -778,7 +778,8 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
crossAxisAlignment: .start,
|
crossAxisAlignment: .start,
|
||||||
children: [
|
children: [
|
||||||
// _buildHeader(context),
|
// _buildHeader(context),
|
||||||
const SizedBox(height: kToolbarHeight),
|
// const SizedBox(height: kToolbarHeight),
|
||||||
|
const SizedBox(height: 30),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(width: 20),
|
const SizedBox(width: 20),
|
||||||
|
|||||||
Reference in New Issue
Block a user