diff --git a/.gradle/8.0/executionHistory/executionHistory.bin b/.gradle/8.0/executionHistory/executionHistory.bin index 4aea22a..4a55c40 100755 Binary files a/.gradle/8.0/executionHistory/executionHistory.bin and b/.gradle/8.0/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.0/executionHistory/executionHistory.lock b/.gradle/8.0/executionHistory/executionHistory.lock index 856933e..e9685a9 100755 Binary files a/.gradle/8.0/executionHistory/executionHistory.lock and b/.gradle/8.0/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.0/fileHashes/fileHashes.bin b/.gradle/8.0/fileHashes/fileHashes.bin index f7e5bd8..b8ea112 100755 Binary files a/.gradle/8.0/fileHashes/fileHashes.bin and b/.gradle/8.0/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.0/fileHashes/fileHashes.lock b/.gradle/8.0/fileHashes/fileHashes.lock index 3380bca..74c41fd 100755 Binary files a/.gradle/8.0/fileHashes/fileHashes.lock and b/.gradle/8.0/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.0/fileHashes/resourceHashesCache.bin b/.gradle/8.0/fileHashes/resourceHashesCache.bin index f0fec81..b42ad6f 100755 Binary files a/.gradle/8.0/fileHashes/resourceHashesCache.bin and b/.gradle/8.0/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index c433dfd..7b94782 100755 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index d151435..c5106a0 100755 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index f2a5394..845b245 100755 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml index eebf7eb..ddfd38e 100755 --- a/.idea/assetWizardSettings.xml +++ b/.idea/assetWizardSettings.xml @@ -16,24 +16,11 @@ - diff --git a/app/build.gradle b/app/build.gradle index f301935..8140a3c 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,6 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' - id 'com.google.gms.google-services' } android { diff --git a/app/src/main/java/com/zerodev/todo/BugReport/ReportBug.kt b/app/src/main/java/com/zerodev/todo/BugReport/ReportBug.kt index cf7338f..96089be 100644 --- a/app/src/main/java/com/zerodev/todo/BugReport/ReportBug.kt +++ b/app/src/main/java/com/zerodev/todo/BugReport/ReportBug.kt @@ -6,10 +6,10 @@ import android.content.Context import android.os.Build import android.widget.Toast import androidx.appcompat.app.AlertDialog +import okhttp3.ResponseBody import retrofit2.Call import retrofit2.Callback import retrofit2.Response -import okhttp3.ResponseBody import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory @@ -29,8 +29,8 @@ class ReportBug { val service = retrofit.create(DiscordApi::class.java) val webhookdata = WebhookData(message) service.sendMessage( - "1191698044211703950", - "ZZ_6hKT0xB2MtR6gyLIJPi6razz9PjmOpWMi2UlY0Op_JHbvM1nrhxDJ9HkmN6J_7IhC", + "webhook ID", + "Webhook token", webhookdata ).enqueue(object : Callback { override fun onResponse( diff --git a/app/src/main/java/com/zerodev/todo/TaskAdapter.kt b/app/src/main/java/com/zerodev/todo/TaskAdapter.kt index 1a6daf3..6a73e5f 100755 --- a/app/src/main/java/com/zerodev/todo/TaskAdapter.kt +++ b/app/src/main/java/com/zerodev/todo/TaskAdapter.kt @@ -3,13 +3,10 @@ package com.zerodev.todo import android.annotation.SuppressLint import android.app.AlertDialog import android.content.Context +import android.content.res.Configuration import android.graphics.Color import android.graphics.Paint -import android.opengl.Visibility -import android.text.Spannable -import android.text.SpannableString -import android.text.SpannableStringBuilder -import android.text.style.ForegroundColorSpan +import android.graphics.PorterDuff import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -17,11 +14,9 @@ import android.widget.CheckBox import android.widget.ImageView import android.widget.PopupMenu import android.widget.TextView -import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView import com.google.gson.Gson import java.text.SimpleDateFormat -import java.time.Instant import java.util.Date @@ -72,6 +67,10 @@ class TaskAdapter(private var tasks: MutableList , private val context: Co refreshSharedPref() notifyItemChanged(position) } + if (isDarkMode(context)) + holder.moreimg.setColorFilter(Color.WHITE , PorterDuff.Mode.MULTIPLY) + else + holder.moreimg.setColorFilter(Color.BLACK , PorterDuff.Mode.MULTIPLY) // more details //TODO : Add a edit dialog in the next update holder.moreimg.setOnClickListener { @@ -163,6 +162,10 @@ class TaskAdapter(private var tasks: MutableList , private val context: Co return finisehdDate == today } + fun isDarkMode(context: Context): Boolean { + val darkModeFlag = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK + return darkModeFlag == Configuration.UI_MODE_NIGHT_YES + } diff --git a/app/src/main/java/com/zerodev/todo/ui/aboutus/AboutUsFragment.kt b/app/src/main/java/com/zerodev/todo/ui/aboutus/AboutUsFragment.kt index 14df08c..80cd5ac 100755 --- a/app/src/main/java/com/zerodev/todo/ui/aboutus/AboutUsFragment.kt +++ b/app/src/main/java/com/zerodev/todo/ui/aboutus/AboutUsFragment.kt @@ -9,7 +9,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.TextView import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider import com.zerodev.todo.databinding.FragmentAboutusBinding @@ -47,8 +46,17 @@ class AboutUsFragment : Fragment() { } } // instagram + // for now i remove the instagram + binding.instagram.visibility = View.GONE binding.instagram.setOnClickListener{ - //TODO: add the code here + val insUrl = "" + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(insUrl)) + intent.setPackage("com.discord") + if (context?.let { isIntentAvailable(it, intent) } == true) { + startActivity(intent) + } else { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(insUrl))) + } } binding.discord.setOnClickListener{ val disUrl = "https://discord.gg/FQxG3pmEB7" @@ -60,6 +68,19 @@ class AboutUsFragment : Fragment() { startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(disUrl))) } } + binding.tiktok.setOnClickListener { + val Url = "https://www.tiktok.com/@grandffyt?_t=8jiaWme2IUo&_r=1" + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(Url)) + intent.setPackage("com.zhiliaoapp.musically") + if (context?.let { isIntentAvailable(it, intent) } == true) { + startActivity(intent) + } else { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(Url))) + } + } + binding.github.setOnClickListener { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://www.tiktok.com/@grandffyt?_t=8jiaWme2IUo&_r=1"))) + } return root } diff --git a/app/src/main/java/com/zerodev/todo/ui/home/HomeFragment.kt b/app/src/main/java/com/zerodev/todo/ui/home/HomeFragment.kt index 1c1bcfb..7be3038 100755 --- a/app/src/main/java/com/zerodev/todo/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/zerodev/todo/ui/home/HomeFragment.kt @@ -43,13 +43,18 @@ class HomeFragment : Fragment() { _binding = FragmentHomeBinding.inflate(inflater, container, false) binding.fab.setOnClickListener { view -> - val dialogView = LayoutInflater.from(context).inflate(R.layout.new_item_dialog, null) + val dialogView = LayoutInflater.from(context).inflate(R.layout.new_item_dialog , null) + val taskEditText = dialogView.findViewById(R.id.taskEditText) val desc = dialogView.findViewById(R.id.desc) val cancelButton = dialogView.findViewById