From 56801aef74a1d0c681e303571dc55e325187cf2c Mon Sep 17 00:00:00 2001 From: PixelHell97 Date: Wed, 3 Apr 2024 00:18:35 +0200 Subject: [PATCH 1/2] +debugging --- .../toctalk/data/database/PrivateChatMdb.kt | 60 +++++++++++++++++-- .../com/pixel/toctalk/data/model/Contact.kt | 3 + .../com/pixel/toctalk/ui/home/MainActivity.kt | 8 +++ .../ui/home/fragment/chat/ChatFragment.kt | 12 +++- .../searchContact/SearchContactFragment.kt | 3 +- .../searchContact/SearchContactViewModel.kt | 4 +- .../main/res/layout/fragment_edit_account.xml | 43 ++++++------- app/src/main/res/layout/fragment_home.xml | 5 +- gradle/libs.versions.toml | 2 +- 9 files changed, 103 insertions(+), 37 deletions(-) diff --git a/app/src/main/java/com/pixel/toctalk/data/database/PrivateChatMdb.kt b/app/src/main/java/com/pixel/toctalk/data/database/PrivateChatMdb.kt index 8e2b4f5..c9d5af6 100644 --- a/app/src/main/java/com/pixel/toctalk/data/database/PrivateChatMdb.kt +++ b/app/src/main/java/com/pixel/toctalk/data/database/PrivateChatMdb.kt @@ -2,13 +2,14 @@ package com.pixel.toctalk.data.database import com.google.android.gms.tasks.OnCompleteListener import com.google.firebase.Firebase +import com.google.firebase.firestore.DocumentSnapshot import com.google.firebase.firestore.firestore import com.pixel.toctalk.Constants import com.pixel.toctalk.data.model.ChatMessage import com.pixel.toctalk.data.model.Contact object PrivateChatMdb { - fun createChat(contact: Contact, onComplete: OnCompleteListener) { + fun createChat(contact: Contact, onComplete: OnCompleteListener) { Firebase .firestore .collection(Constants.COLLECTION_PRIVATE_CHAT) @@ -18,13 +19,22 @@ object PrivateChatMdb { } } - private fun updateChatID(id: String, onComplete: OnCompleteListener) { + private fun updateChatID(id: String, onComplete: OnCompleteListener) { Firebase .firestore .collection(Constants.COLLECTION_PRIVATE_CHAT) .document(id) .update(Contact.CHAT_ID_FIELD, id) - .addOnCompleteListener(onComplete) + .addOnCompleteListener { + if (it.isSuccessful) { + Firebase + .firestore + .collection(Constants.COLLECTION_PRIVATE_CHAT) + .document(id) + .get() + .addOnCompleteListener(onComplete) + } + } } fun updateLastMessage(id: String, docID: String, collection: String) { @@ -37,15 +47,57 @@ object PrivateChatMdb { .document(id) .get() .addOnCompleteListener { + val chatMessage = it.result.toObject(ChatMessage::class.java) Firebase .firestore .collection(collection) .document(docID) .update( Contact.LAST_MESSAGE_FIELD, - it.result.toObject(ChatMessage::class.java), + chatMessage, ) + .addOnCompleteListener { task -> + if (task.isSuccessful) { + Firebase + .firestore + .collection(collection) + .document(docID) + .update( + Contact.LAST_TIMESTAMP_FIELD, + chatMessage?.timestamp, + ) + } + } } } } + + private fun deleteChat(chatID: String) { + Firebase + .firestore + .collection(Constants.COLLECTION_PRIVATE_CHAT) + .document(chatID) + .delete() + .addOnCompleteListener { if (it.isSuccessful) return@addOnCompleteListener } + } + + fun checkIfChatEmpty(id: String?) { + getChat(id) { chatTask -> + if (chatTask.isSuccessful) { + val chat = chatTask.result.toObject(Contact::class.java) + if (chat?.lastMessage == null) { + deleteChat(id!!) + } + } + } + } + + private fun getChat(id: String?, onComplete: OnCompleteListener) { + Firebase + .firestore + .collection(Constants.COLLECTION_PRIVATE_CHAT) + .document(id!!) + .get() + .addOnCompleteListener(onComplete) + } } diff --git a/app/src/main/java/com/pixel/toctalk/data/model/Contact.kt b/app/src/main/java/com/pixel/toctalk/data/model/Contact.kt index 7fb7899..528b876 100644 --- a/app/src/main/java/com/pixel/toctalk/data/model/Contact.kt +++ b/app/src/main/java/com/pixel/toctalk/data/model/Contact.kt @@ -1,17 +1,20 @@ package com.pixel.toctalk.data.model import android.os.Parcelable +import com.google.firebase.Timestamp import kotlinx.parcelize.Parcelize @Parcelize data class Contact( val id: String? = null, val lastMessage: ChatMessage? = null, + val lastTimestamp: Timestamp? = null, val usersID: List? = null, ) : Parcelable { companion object { const val USERS_ID_FIELD = "usersID" const val CHAT_ID_FIELD = "id" const val LAST_MESSAGE_FIELD = "lastMessage" + const val LAST_TIMESTAMP_FIELD = "lastTimestamp" } } diff --git a/app/src/main/java/com/pixel/toctalk/ui/home/MainActivity.kt b/app/src/main/java/com/pixel/toctalk/ui/home/MainActivity.kt index 4abfbf9..01665e4 100644 --- a/app/src/main/java/com/pixel/toctalk/ui/home/MainActivity.kt +++ b/app/src/main/java/com/pixel/toctalk/ui/home/MainActivity.kt @@ -39,6 +39,9 @@ class MainActivity : AppCompatActivity() { setUpNav() } + fun setActionbarTitle(title: String) { + supportActionBar?.title = title + } private fun setUpNav() { val navHostFragment = supportFragmentManager.findFragmentById(R.id.homeFragmentContainer) as NavHostFragment @@ -98,4 +101,9 @@ class MainActivity : AppCompatActivity() { .setCancelable(message.isCancelable) alertDialog.show() } + + override fun onDestroy() { + super.onDestroy() + setSupportActionBar(null) + } } diff --git a/app/src/main/java/com/pixel/toctalk/ui/home/fragment/chat/ChatFragment.kt b/app/src/main/java/com/pixel/toctalk/ui/home/fragment/chat/ChatFragment.kt index bad24f9..7b7c28b 100644 --- a/app/src/main/java/com/pixel/toctalk/ui/home/fragment/chat/ChatFragment.kt +++ b/app/src/main/java/com/pixel/toctalk/ui/home/fragment/chat/ChatFragment.kt @@ -8,6 +8,7 @@ import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.pixel.toctalk.R +import com.pixel.toctalk.data.database.PrivateChatMdb import com.pixel.toctalk.data.model.Contact import com.pixel.toctalk.data.model.Group import com.pixel.toctalk.databinding.FragmentChatBinding @@ -43,7 +44,7 @@ class ChatFragment : BaseFragment() { } MessageState.GROUP.value -> { - (activity as MainActivity).supportActionBar?.title = args.groupChat?.name + (activity as MainActivity).setActionbarTitle(args.groupChat?.name!!) initGroupView() viewModel.messageState.value = MessageState.GROUP viewModel.initGroupChatFireStoreOption() @@ -112,6 +113,15 @@ class ChatFragment : BaseFragment() { findNavController().navigate(action) } + override fun onStop() { + super.onStop() + when (args.state) { + MessageState.CONTACT.value -> { + PrivateChatMdb.checkIfChatEmpty(args.contentChat?.id) + } + } + } + override fun onDestroyView() { super.onDestroyView() _chatAdapter = null diff --git a/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactFragment.kt b/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactFragment.kt index 59e03de..3d7f4c0 100644 --- a/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactFragment.kt +++ b/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactFragment.kt @@ -48,9 +48,8 @@ class SearchContactFragment : BaseFragment viewModel.createChatInDB(user) } diff --git a/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactViewModel.kt b/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactViewModel.kt index c325be7..29b4c06 100644 --- a/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactViewModel.kt +++ b/app/src/main/java/com/pixel/toctalk/ui/home/fragment/home/searchContact/SearchContactViewModel.kt @@ -47,8 +47,8 @@ class SearchContactViewModel : BaseViewModel() { PrivateChatMdb .createChat(newContact) { if (it.isSuccessful) { - // TODO: Send the new contact with id - state.value = SearchContactState.NavToChat(newContact) + state.value = it.result.toObject(Contact::class.java) + ?.let { it1 -> SearchContactState.NavToChat(it1) } } } } diff --git a/app/src/main/res/layout/fragment_edit_account.xml b/app/src/main/res/layout/fragment_edit_account.xml index 01a1e62..6058892 100644 --- a/app/src/main/res/layout/fragment_edit_account.xml +++ b/app/src/main/res/layout/fragment_edit_account.xml @@ -50,39 +50,32 @@ app:layout_constraintEnd_toEndOf="@id/open_pic" app:shapeAppearanceOverlay="@style/CircularPhoto" /> - + app:layout_constraintTop_toBottomOf="@id/open_pic" + app:startIconDrawable="@drawable/ic_user"> - - - - - + android:background="@android:color/transparent" + android:inputType="text" + android:text="@={vm.usernameLiveData}" /> + + android:layout_height="match_parent" + android:background="@color/white" /> diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3cbfa56..5ff3bb0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ espressoCore = "3.5.1" appcompat = "1.6.1" material = "1.11.0" activity = "1.8.2" -constraintlayout = "2.1.4" +constraintlayout = "1.0.0-alpha3" lifecycleLivedataKtx = "2.7.0" lifecycleViewmodelKtx = "2.7.0" fragmentKtx = "1.6.2" From 6575a6acbe4408f91e1b0c0d6151850cbf7120db Mon Sep 17 00:00:00 2001 From: Pixelh_97 Date: Thu, 27 Feb 2025 18:53:30 +0200 Subject: [PATCH 2/2] %Project structure updated to Feature Structure +ForgetPassword(UnderDevelop) -Domain layer & Data layer +Project now supported with Koin --- .idea/appInsightsSettings.xml | 2 +- app/build.gradle.kts | 40 ++- app/src/main/AndroidManifest.xml | 46 ++- .../java/com/pixel/toctalk/app/TokTalkApp.kt | 18 + .../data/AuthenticationFirebaseDataSource.kt | 261 ++++++++++++++ .../auth/domain/AuthenticationRepository.kt | 39 +++ .../toctalk/auth/domain/models/AuthUser.kt | 11 + .../auth/domain/usecase/ValidationUseCase.kt | 56 +++ .../auth/domain/util/ValidationError.kt | 12 + .../presentation}/AuthHostActivity.kt | 10 +- .../presentation}/fragment/InputState.kt | 2 +- .../createAccount/CreateAccountContract.kt | 19 + .../createAccount/RegisterViewEvent.kt | 17 + .../createAccount/RegisterViewModel.kt | 330 ++++++++++++++++++ .../CompleteProfileFragment.kt | 141 ++++++++ .../register/RegisterFragment.kt | 133 +++++++ .../fragment/login/LoginContract.kt | 12 + .../fragment/login/LoginFragment.kt | 120 +++++++ .../fragment/login/LoginViewEvent.kt | 17 + .../fragment/login/LoginViewModel.kt | 89 +++++ .../resetPassword/ResetPasswordEvent.kt | 13 + .../resetPassword/ResetPasswordViewModel.kt | 57 +++ .../ConfirmPasswordResetCodeFragment.kt | 13 + .../sendCode/SendResetPasswordCodeFragment.kt | 87 +++++ .../updatePassword/UpdatePasswordFragment.kt | 24 ++ .../pixel/toctalk/core/data/models/UserDto.kt | 18 + .../core/domain/util/SingleLiveEvent.kt | 48 +++ .../core/presentation/BaseAuthFragment.kt | 43 +++ .../presentation}/BaseFragment.kt | 2 +- .../presentation}/BaseViewModel.kt | 4 +- .../java/com/pixel/toctalk/di/AppModule.kt | 23 ++ .../ui/auth/fragment/login/LoginFragment.kt | 75 ---- .../ui/auth/fragment/login/LoginViewEvent.kt | 9 - .../ui/auth/fragment/login/LoginViewModel.kt | 92 ----- .../fragment/register/RegisterFragment.kt | 69 ---- .../fragment/register/RegisterViewEvent.kt | 5 - .../fragment/register/RegisterViewModel.kt | 168 --------- app/src/main/res/drawable/avatar_group.png | Bin 0 -> 11142 bytes app/src/main/res/drawable/avatar_user.png | Bin 0 -> 13705 bytes .../main/res/layout/activity_auth_host.xml | 44 +-- app/src/main/res/layout/content_auth.xml | 9 +- ... => fragment_complete_of_edit_account.xml} | 38 +- app/src/main/res/layout/fragment_login.xml | 286 ++++++++------- app/src/main/res/layout/fragment_register.xml | 292 ++++++++-------- .../fragment_send_reset_password_code.xml | 55 +++ .../res/layout/fragment_update_password.xml | 13 + app/src/main/res/values-ar/strings.xml | 86 +++++ app/src/main/res/values-night/themes.xml | 15 + app/src/main/res/values/strings.xml | 49 ++- app/src/main/res/values/themes.xml | 56 ++- build.gradle.kts | 2 + data/.gitignore | 1 - data/build.gradle.kts | 44 --- data/consumer-rules.pro | 0 data/proguard-rules.pro | 21 -- .../com/pixel/data/ExampleInstrumentedTest.kt | 22 -- data/src/main/AndroidManifest.xml | 4 - .../java/com/pixel/data/ExampleUnitTest.kt | 16 - domain/.gitignore | 1 - domain/build.gradle.kts | 44 --- domain/consumer-rules.pro | 0 domain/proguard-rules.pro | 21 -- .../pixel/domain/ExampleInstrumentedTest.kt | 22 -- domain/src/main/AndroidManifest.xml | 4 - .../java/com/pixel/domain/ExampleUnitTest.kt | 16 - settings.gradle.kts | 2 - 66 files changed, 2303 insertions(+), 985 deletions(-) create mode 100644 app/src/main/java/com/pixel/toctalk/app/TokTalkApp.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/data/AuthenticationFirebaseDataSource.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/domain/AuthenticationRepository.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/domain/models/AuthUser.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/domain/usecase/ValidationUseCase.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/domain/util/ValidationError.kt rename app/src/main/java/com/pixel/toctalk/{ui/auth => auth/presentation}/AuthHostActivity.kt (77%) rename app/src/main/java/com/pixel/toctalk/{ui/auth => auth/presentation}/fragment/InputState.kt (80%) create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/createAccount/CreateAccountContract.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/createAccount/RegisterViewEvent.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/createAccount/RegisterViewModel.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/createAccount/completeProfile/CompleteProfileFragment.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/createAccount/register/RegisterFragment.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/login/LoginContract.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/login/LoginFragment.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/login/LoginViewEvent.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/login/LoginViewModel.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/resetPassword/ResetPasswordEvent.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/resetPassword/ResetPasswordViewModel.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/resetPassword/confirmCode/ConfirmPasswordResetCodeFragment.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/resetPassword/sendCode/SendResetPasswordCodeFragment.kt create mode 100644 app/src/main/java/com/pixel/toctalk/auth/presentation/fragment/resetPassword/updatePassword/UpdatePasswordFragment.kt create mode 100644 app/src/main/java/com/pixel/toctalk/core/data/models/UserDto.kt create mode 100644 app/src/main/java/com/pixel/toctalk/core/domain/util/SingleLiveEvent.kt create mode 100644 app/src/main/java/com/pixel/toctalk/core/presentation/BaseAuthFragment.kt rename app/src/main/java/com/pixel/toctalk/{ui/base => core/presentation}/BaseFragment.kt (95%) rename app/src/main/java/com/pixel/toctalk/{ui/base => core/presentation}/BaseViewModel.kt (75%) create mode 100644 app/src/main/java/com/pixel/toctalk/di/AppModule.kt delete mode 100644 app/src/main/java/com/pixel/toctalk/ui/auth/fragment/login/LoginFragment.kt delete mode 100644 app/src/main/java/com/pixel/toctalk/ui/auth/fragment/login/LoginViewEvent.kt delete mode 100644 app/src/main/java/com/pixel/toctalk/ui/auth/fragment/login/LoginViewModel.kt delete mode 100644 app/src/main/java/com/pixel/toctalk/ui/auth/fragment/register/RegisterFragment.kt delete mode 100644 app/src/main/java/com/pixel/toctalk/ui/auth/fragment/register/RegisterViewEvent.kt delete mode 100644 app/src/main/java/com/pixel/toctalk/ui/auth/fragment/register/RegisterViewModel.kt create mode 100644 app/src/main/res/drawable/avatar_group.png create mode 100644 app/src/main/res/drawable/avatar_user.png rename app/src/main/res/layout/{fragment_edit_account.xml => fragment_complete_of_edit_account.xml} (82%) create mode 100644 app/src/main/res/layout/fragment_send_reset_password_code.xml create mode 100644 app/src/main/res/layout/fragment_update_password.xml create mode 100644 app/src/main/res/values-ar/strings.xml create mode 100644 app/src/main/res/values-night/themes.xml delete mode 100644 data/.gitignore delete mode 100644 data/build.gradle.kts delete mode 100644 data/consumer-rules.pro delete mode 100644 data/proguard-rules.pro delete mode 100644 data/src/androidTest/java/com/pixel/data/ExampleInstrumentedTest.kt delete mode 100644 data/src/main/AndroidManifest.xml delete mode 100644 data/src/test/java/com/pixel/data/ExampleUnitTest.kt delete mode 100644 domain/.gitignore delete mode 100644 domain/build.gradle.kts delete mode 100644 domain/consumer-rules.pro delete mode 100644 domain/proguard-rules.pro delete mode 100644 domain/src/androidTest/java/com/pixel/domain/ExampleInstrumentedTest.kt delete mode 100644 domain/src/main/AndroidManifest.xml delete mode 100644 domain/src/test/java/com/pixel/domain/ExampleUnitTest.kt diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml index bd02285..97ff4fa 100644 --- a/.idea/appInsightsSettings.xml +++ b/.idea/appInsightsSettings.xml @@ -1,7 +1,7 @@ - diff --git a/app/src/main/res/layout/fragment_login.xml b/app/src/main/res/layout/fragment_login.xml index 2c3deb9..6921a0d 100644 --- a/app/src/main/res/layout/fragment_login.xml +++ b/app/src/main/res/layout/fragment_login.xml @@ -6,141 +6,187 @@ + name="isLoading" + type="Boolean" /> - - - - - - + + - - + + - - - - - + + + - - - - - - + android:layout_marginTop="128dp" + android:clickable="@{!isLoading}" + android:orientation="vertical" + android:paddingHorizontal="12dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/welcome_message"> + + + + + + + + + + + + + - - + + + android:layout_marginHorizontal="32dp" + android:layout_marginTop="124dp" + android:clickable="@{!isLoading}" + app:cardBackgroundColor="@{isLoading == false ? @color/light_blue : @color/white}" + app:contentPaddingBottom="8dp" + app:contentPaddingLeft="32dp" + app:contentPaddingRight="32dp" + app:contentPaddingTop="8dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/input_field"> + + + + + + + - - - - - + android:layout_gravity="start" + android:layout_marginTop="16dp" + android:clickable="@{!isLoading}" + android:fontFamily="@font/poppins_medium1" + android:text="@string/or_create_my_account" + android:textColor="@color/pretty_gray" + android:textSize="14sp" + app:layout_constraintStart_toStartOf="@id/btn_login" + app:layout_constraintTop_toBottomOf="@id/btn_login" /> + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_register.xml b/app/src/main/res/layout/fragment_register.xml index 6282e42..5e01b16 100644 --- a/app/src/main/res/layout/fragment_register.xml +++ b/app/src/main/res/layout/fragment_register.xml @@ -6,169 +6,163 @@ + name="isLoading" + type="Boolean" /> - - - - - + + - - + tools:context=".auth.presentation.fragment.createAccount.register.RegisterFragment"> - - - - - - + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - + + + + + + - - + android:layout_marginTop="16dp" + android:layout_marginBottom="64dp" + android:clickable="@{!isLoading}" + app:cardBackgroundColor="@color/white" + app:contentPaddingBottom="8dp" + app:contentPaddingLeft="32dp" + app:contentPaddingRight="32dp" + app:contentPaddingTop="8dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/user_info"> + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_send_reset_password_code.xml b/app/src/main/res/layout/fragment_send_reset_password_code.xml new file mode 100644 index 0000000..bf50fef --- /dev/null +++ b/app/src/main/res/layout/fragment_send_reset_password_code.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_update_password.xml b/app/src/main/res/layout/fragment_update_password.xml new file mode 100644 index 0000000..63fd161 --- /dev/null +++ b/app/src/main/res/layout/fragment_update_password.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml new file mode 100644 index 0000000..a00aeb9 --- /dev/null +++ b/app/src/main/res/values-ar/strings.xml @@ -0,0 +1,86 @@ + + + TocTalk + البريد الالكتروني + كلمة المرور + + يجب أن تتكون كلمة المرور من 8 أحرف على الأقل وتشمل: + • حرف واحد على الأقل (A-Z أو a-z) + • رقم واحد على الأقل (0-9) + • رمز خاص واحد على الأقل (@, $, !, %, *, #, ?, &) + + نسيت كلمة المرور؟ + تسجيل دخول + انشاء حساب جديد + اسم المسخدم + انضمام + انشاء حساب + تاكيد كلمة المرور + انشاء مجموعه + لم يتم الإنضمام الي أي غرف بعد + لا يوجد مجموعات هنا بعد + انقر الزر العائم لانشاء مجموعه جديده + لا توجد دردشه هنا بعد + اكتب رسالة… + إرسال + انشاء مجموعة جديده + اسم المجموعه + وصف المجموعه + انقر لإختيار الصوره + الرئيسية + الحساب + مغادرة المجموعه + الوصف… + الاعضاء… + اسم المستخدم + بحث + انت: %s + لا يوجد مستخدم + سجدل دخول مجددا + غير قادر علي تسجيد الدخول + الرجاء المحاوله مره اخري + غير قادر علي تسجيد الدخول + حفظ + تسجيل الخروج + الإعدادات + الحساب + البحث + حدث خطأ ما + لم نتمكن من تحديث حسابك, الرجاء المحاوله لاحقا + الرجوع + تفاصيل المستخدم + خذف المحادثه + حذر المستخدم + حذر المجموعه + تفاصيل المجموعه + تم + هذا التطبيق يستعمل اذن الوصول للمخزن + تعديل المجموعه + تغيير اسم المجموعه + تم تغيير الاسم بنجاح + فشل التحديث + تغيير الصوره + حذف الصوره + تم حذف الصوره بنجاح + تغيير وصف المجموعه + لقد غادرت المجموعه + هل انت متاكد من انك تريد مغادرة المجموعه + مغادره + الغاء + يرجى إدخال عنوان بريد إلكتروني صحيح + + + محادثاتي + مجموعاتي + تصفح المجموعات + + + + لا يوجد اعضاء %d + عضو %d + عضوان %d + اعضاء %d + اعضاء %d + + الحقل مطلوب + \ No newline at end of file diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..b4c1b30 --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 3d2fc68..7153966 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,6 +5,7 @@ buildscript { } dependencies { classpath(libs.androidx.navigation.safe.args.gradle.plugin) + // classpath(libs.google.services) } } plugins { @@ -12,4 +13,5 @@ plugins { alias(libs.plugins.jetbrainsKotlinAndroid) apply false alias(libs.plugins.googleServices) apply false alias(libs.plugins.androidLibrary) apply false + alias(libs.plugins.firebaseCrashlytics) apply false } diff --git a/data/.gitignore b/data/.gitignore deleted file mode 100644 index 42afabf..0000000 --- a/data/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/data/build.gradle.kts b/data/build.gradle.kts deleted file mode 100644 index be22af0..0000000 --- a/data/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsKotlinAndroid) -} - -android { - namespace = "com.pixel.data" - compileSdk = 34 - - defaultConfig { - minSdk = 24 - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") - } - - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro", - ) - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) - implementation(project(":domain")) - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} diff --git a/data/consumer-rules.pro b/data/consumer-rules.pro deleted file mode 100644 index e69de29..0000000 diff --git a/data/proguard-rules.pro b/data/proguard-rules.pro deleted file mode 100644 index 481bb43..0000000 --- a/data/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/data/src/androidTest/java/com/pixel/data/ExampleInstrumentedTest.kt b/data/src/androidTest/java/com/pixel/data/ExampleInstrumentedTest.kt deleted file mode 100644 index ad715a9..0000000 --- a/data/src/androidTest/java/com/pixel/data/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.pixel.data - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.* -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.pixel.data.test", appContext.packageName) - } -} diff --git a/data/src/main/AndroidManifest.xml b/data/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e6..0000000 --- a/data/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/data/src/test/java/com/pixel/data/ExampleUnitTest.kt b/data/src/test/java/com/pixel/data/ExampleUnitTest.kt deleted file mode 100644 index 2fc7fac..0000000 --- a/data/src/test/java/com/pixel/data/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.pixel.data - -import org.junit.Assert.* -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/domain/.gitignore b/domain/.gitignore deleted file mode 100644 index 42afabf..0000000 --- a/domain/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/domain/build.gradle.kts b/domain/build.gradle.kts deleted file mode 100644 index 2354321..0000000 --- a/domain/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsKotlinAndroid) - id("kotlin-parcelize") -} - -android { - namespace = "com.pixel.domain" - compileSdk = 34 - - defaultConfig { - minSdk = 24 - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles("consumer-rules.pro") - } - - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro", - ) - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} diff --git a/domain/consumer-rules.pro b/domain/consumer-rules.pro deleted file mode 100644 index e69de29..0000000 diff --git a/domain/proguard-rules.pro b/domain/proguard-rules.pro deleted file mode 100644 index 481bb43..0000000 --- a/domain/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/domain/src/androidTest/java/com/pixel/domain/ExampleInstrumentedTest.kt b/domain/src/androidTest/java/com/pixel/domain/ExampleInstrumentedTest.kt deleted file mode 100644 index 15bc514..0000000 --- a/domain/src/androidTest/java/com/pixel/domain/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.pixel.domain - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.* -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.pixel.domain.test", appContext.packageName) - } -} diff --git a/domain/src/main/AndroidManifest.xml b/domain/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e6..0000000 --- a/domain/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/domain/src/test/java/com/pixel/domain/ExampleUnitTest.kt b/domain/src/test/java/com/pixel/domain/ExampleUnitTest.kt deleted file mode 100644 index 4fdde0a..0000000 --- a/domain/src/test/java/com/pixel/domain/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.pixel.domain - -import org.junit.Assert.* -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index bb1986c..16a6031 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -22,5 +22,3 @@ dependencyResolutionManagement { rootProject.name = "TocTalk" include(":app") -include(":domain") -include(":data")