Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Thinking-Earth/sinkingus
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
eunjijeon11 committed Apr 22, 2024
2 parents 29d4e7e + 1942494 commit c07f9e1
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 38 deletions.
24 changes: 12 additions & 12 deletions .firebase/hosting.YnVpbGQvd2Vi.cache
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
favicon.ico,1712637073838,71ee8e9861af2e2968cb1b561271e1ba95d599e3eba4754bada7f1aa4a378e10
flutter.js,1711515606000,2b0bce331d7b18fe27d917413033092f950fc776b039c7b5ec17eafca56cd48e
main.dart.js,1713728073584,bef49ec42fd87a226f804756630c9736fb1a35bbac56f3d14733fbb2e88c06ba
manifest.json,1706540521921,8df4ad8a1d7ef263a4394c18d2abed3783d3990ee3c8970c1c4f79e7cfa04e9f
assets/assets/audio/Chapter%20Book.mp3,1713688023509,94b517421bb7726d03f25e4bc605b6743bf977a16fdc26bd4312733732610a27
assets/assets/audio/send_chat.mp3,1713688023510,9aab6179bad0aa33345000b12c8036c4fd0e7a12de80d0c7407390221bf5adbe
Expand Down Expand Up @@ -108,15 +109,14 @@ canvaskit/chromium/canvaskit.js.symbols,1711515782000,e4a3bea6115f7c4a05cfccadac
canvaskit/chromium/canvaskit.wasm,1711515784000,814e41fcb7cf6972c7a9157da99e1ba10897834c562111f1bc9abc10be1c40bd
splash/img/ic-launch.png,1712637073817,20f7fa4f61a69a18c92677b80cdd13570028394a258e351e5cdeccd1131e9c30
splash/img/ic-launch_x4.png,1712637073840,41d695aed2232e7c7e32ff37922e45d55e7703918aca6bbd327546ffaf4cdb4f
index.html,1713724538610,cd50ce3a25115a10eafc95ea7077eabbdb69fd2a6c7493c37e72830c5f66d0fe
version.json,1713724537576,33c5602025f03c5f3c0d005bcb206cc45d5f75bc50f2c540e0634b90d2ced9b6
flutter_service_worker.js,1713724539131,5c109a59ef5fad0665919bdd12c83387458fb5afffe4f6a519704bee8be6277f
assets/AssetManifest.bin,1713724537699,fd73695cafbe11bd47f61ed3dee3064065bbb08c18996e4c258325363f3b5690
assets/AssetManifest.bin.json,1713724537699,84de1a9b8a2f5ab4caafeeb81c6da983f0f569663206c53e0123c0fc5363a8f5
assets/AssetManifest.json,1713724537699,a8662afb40ea74983aa27563afd9f810790088d01c667b5790d841516aa3fced
assets/fonts/MaterialIcons-Regular.otf,1713724538605,078d4a8ad7b2dfc73c171fc3032ab105f74ca9e0c68b6aabe8465399116b8cbc
assets/FontManifest.json,1713724537699,edfa9439b0a36679c90bb7a4eab0d50955a392814827dad10fd2b118cc696e3a
assets/packages/cupertino_icons/assets/CupertinoIcons.ttf,1713724538605,24f1f997e171e315f5758bf5e732cca83372490761c9a176979f23c53deeb3ae
assets/shaders/ink_sparkle.frag,1713724537789,80c6e65c75f1de434b1b22dba61e96ad82dba0f2fc5e8b3b59c2def46d794354
assets/NOTICES,1713724537700,f78e243b8831f39f48d3ac1cc42cad8bd31851b42fd24056d3a87120cdda20b2
main.dart.js,1713724537103,cec973e35ce7b906f52a62a8976ba73878a002a05037539bc338ebb6e6707db9
version.json,1713729369520,33c5602025f03c5f3c0d005bcb206cc45d5f75bc50f2c540e0634b90d2ced9b6
index.html,1713729370679,70d51ed5c9c77cc484a0a117d9f32f84814d35a0bfba7ec200152fd842dcaba2
assets/AssetManifest.bin,1713729369625,fd73695cafbe11bd47f61ed3dee3064065bbb08c18996e4c258325363f3b5690
assets/AssetManifest.bin.json,1713729369626,84de1a9b8a2f5ab4caafeeb81c6da983f0f569663206c53e0123c0fc5363a8f5
assets/FontManifest.json,1713729369626,edfa9439b0a36679c90bb7a4eab0d50955a392814827dad10fd2b118cc696e3a
assets/AssetManifest.json,1713729369626,a8662afb40ea74983aa27563afd9f810790088d01c667b5790d841516aa3fced
flutter_service_worker.js,1713729371213,d104f8db99a27740771f085a46a59cd28533043a8f9e3a0f3f77f30781b1f508
assets/fonts/MaterialIcons-Regular.otf,1713729370673,078d4a8ad7b2dfc73c171fc3032ab105f74ca9e0c68b6aabe8465399116b8cbc
assets/shaders/ink_sparkle.frag,1713729369745,80c6e65c75f1de434b1b22dba61e96ad82dba0f2fc5e8b3b59c2def46d794354
assets/packages/cupertino_icons/assets/CupertinoIcons.ttf,1713729370673,24f1f997e171e315f5758bf5e732cca83372490761c9a176979f23c53deeb3ae
assets/NOTICES,1713729369627,f78e243b8831f39f48d3ac1cc42cad8bd31851b42fd24056d3a87120cdda20b2
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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 21
targetSdkVersion 33
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="sinking_us"
android:label="Sinking Earth"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
4 changes: 4 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"**/node_modules/**"
],
"rewrites": [
{
"source": "/favicon.ico",
"destination": "/favicon.ico"
},
{
"source": "**",
"destination": "/index.html"
Expand Down
2 changes: 1 addition & 1 deletion ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Sinking Us</string>
<string>Sinking Earth</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
10 changes: 6 additions & 4 deletions lib/core/network/firestore_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,18 @@ class FirestoreBase {
}

Future<String?> getDownloadApkLink() async {
String? link;
await _firestore!.collection("download").doc("android").get().then((value) {
return value['apk'];
link = value['apk'];
});
return null;
return link;
}

Future<String?> getDownloadIosLink() async {
String? link;
await _firestore!.collection("download").doc("ios").get().then((value) {
return value['ios'];
link = value['ios'];
});
return null;
return link;
}
}
15 changes: 11 additions & 4 deletions lib/core/network/network_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ import 'package:sinking_us/config/routes/app_router.dart';
import 'package:sinking_us/config/routes/routes.dart';
import 'package:sinking_us/feature/game/domain/match_domain.dart';
import 'package:sinking_us/helpers/extensions/showdialog_helper.dart';
import 'dart:async'; // Import for StreamSubscription

@immutable
class NetWorkStatusManagement {
static final Connectivity _connectivity = Connectivity();
static late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;

const NetWorkStatusManagement._();

static void init(WidgetRef ref) {
Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
if (result != ConnectivityResult.mobile ||
result != ConnectivityResult.wifi) {
_connectivitySubscription = _connectivity.onConnectivityChanged.listen((List<ConnectivityResult> results) {
if (!results.contains(ConnectivityResult.mobile) && !results.contains(ConnectivityResult.wifi)) {
ShowDialogHelper.showAlertWithAction(
onPressed: () {
ref.read(matchDomainControllerProvider.notifier).leaveMatch();
Expand All @@ -24,4 +27,8 @@ class NetWorkStatusManagement {
}
});
}
}

static void dispose() {
_connectivitySubscription.cancel();
}
}
14 changes: 12 additions & 2 deletions lib/feature/game/chats/presentation/view/chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class ChatScreen extends ConsumerStatefulWidget {
}

class _ChatScreenState extends ConsumerState<ChatScreen> {
bool soundPlayed = false;
int counter = 0;

@override
void initState() {
super.initState();
Expand All @@ -35,6 +36,7 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
Widget build(BuildContext context) {
final chatViewModel = ref.watch(openChatViewModelControllerProvider);
final userInfo = ref.read(userDomainControllerProvider).userInfo;
ChatModel? lastChat;

return Container(
width: 240.w,
Expand All @@ -51,7 +53,12 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
stream: chatViewModel.chatStream,
builder: (context, AsyncSnapshot<QuerySnapshot> snapshot) {
if(snapshot.data != null) {
FlameAudio.play("send_chat.mp3");
if(snapshot.data!.docs[0]['role'] != 'server' && lastChat?.content != snapshot.data!.docs[0]['content']) {
counter++;
if(counter % 2 == 0) {
FlameAudio.play("send_chat.mp3");
}
}
return ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(
dragDevices: {
Expand All @@ -65,6 +72,9 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
itemCount: snapshot.data!.docs.length,
itemBuilder: (context, index) {
final ChatModel chat = ChatModel.fromJson(Map<String, dynamic>.from(snapshot.data!.docs[index].data() as Map));
if(index == 0) { // 마지막 채팅
lastChat = chat;
}
if(chat.role == "server") {
return serverChatBubble(chat);
} else if(chat.nick == userInfo!.nick) {
Expand Down
4 changes: 3 additions & 1 deletion lib/feature/home/view/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {

@override
Widget build(BuildContext context) {
final homeViewModel = ref.watch(homeScreenControllerProvider);

return PopScope(
canPop: false,
child: Scaffold(
Expand Down Expand Up @@ -144,7 +146,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
height: 102.h,
child: SingleChildScrollView(
child: Text(
ref.read(homeScreenControllerProvider).bottomText,
homeViewModel.bottomText,
style: AppTypography
.blackPixel
.copyWith(fontSize: 12.sp),
Expand Down
2 changes: 1 addition & 1 deletion lib/feature/setting/view/setting_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class _SettingDialogContentState extends ConsumerState<SettingDialogContent> {
width: 140.w,
height: 40.h,
alignment: Alignment.center,
margin: EdgeInsets.only(top: 16.h),
margin: EdgeInsets.only(top: 8.h),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(AppImages.roomName), fit: BoxFit.fill)),
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SinkingUs extends StatelessWidget {
child: AspectRatio(
aspectRatio: 844 / 390,
child: MaterialApp(
title: "Sinking US",
title: "Sinking Earth",
debugShowCheckedModeBanner: false,
initialRoute: Routes.initialRoute,
theme: AppTheme.light(),
Expand Down
2 changes: 1 addition & 1 deletion macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
FLTFirebaseFunctionsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFunctionsPlugin"))
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseDatabasePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseDatabasePlugin"))
Expand Down
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -325,18 +325,18 @@ packages:
dependency: "direct main"
description:
name: connectivity_plus
sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0"
sha256: ebe15d94de9dd7c31dc2ac54e42780acdf3384b1497c69290c9f3c5b0279fc57
url: "https://pub.dev"
source: hosted
version: "5.0.2"
version: "6.0.2"
connectivity_plus_platform_interface:
dependency: transitive
description:
name: connectivity_plus_platform_interface
sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a
sha256: b6a56efe1e6675be240de39107281d4034b64ac23438026355b4234042a35adb
url: "https://pub.dev"
source: hosted
version: "1.2.4"
version: "2.0.0"
convert:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies:
flutter_svg: ^2.0.9 #svg 사용하기 위함
shared_preferences: ^2.2.2 #tinydb
flutter_secure_storage: ^9.0.0 #난독화 tinydb
connectivity_plus: ^5.0.2 #인터넷 연결 상태 감지
connectivity_plus: ^6.0.2 #인터넷 연결 상태 감지
easy_localization: ^3.0.5 #지역 위치 파악 및 언어팩 연결
intl: ^0.18.0 #다국어 및 다국 시간
animated_text_kit: ^4.2.2 #애니메이션 텍스트
Expand Down
8 changes: 4 additions & 4 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<meta name="description" content="To save the Sinking Earth, we must become Thinking Us.">
<meta name="google-signin-client_id" content="57185542814-0u0fnlmff0t7k54i2jlls5i5husr3ktp.apps.googleusercontent.com">

<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="gardenus">
<meta name="apple-mobile-web-app-title" content="Sinking Earth">
<link rel="apple-touch-icon" href="favicon.ico">

<!-- Web 링크 제목 & 설명 -->
<meta property="og:title" content="Sinking Earth">
<meta property="og:description" content="To save the Sinking Earth, we must become Thinking Us.">
<meta property="og:type" content="website">
<meta property="og:image" content="https://firebasestorage.googleapis.com/v0/b/sinkingus.appspot.com/o/login_bg.png?alt=media&token=c275787d-3a68-49d3-9ee7-026773c54c27">
<meta property="og:image" content="https://firebasestorage.googleapis.com/v0/b/sinkingus.appspot.com/o/web_viewer%2Flogin_bg.png?alt=media&token=b30cf3ac-7bd0-41eb-9f26-e55aae8f578c">

<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">

<title>Sinking US</title>
<title>Sinking Earth</title>
<link rel="manifest" href="manifest.json">

<script>
Expand Down

0 comments on commit c07f9e1

Please sign in to comment.