Skip to content

Commit 6d2b680

Browse files
committed
1.0 v beta
1 parent 8603145 commit 6d2b680

24 files changed

+87
-257
lines changed
Binary file not shown.
Binary file not shown.

.gradle/8.0/fileHashes/fileHashes.bin

200 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
13.4 KB
Binary file not shown.
Binary file not shown.
1.21 KB
Binary file not shown.

.gradle/file-system.probe

0 Bytes
Binary file not shown.

.idea/assetWizardSettings.xml

Lines changed: 3 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
id 'com.android.application'
33
id 'org.jetbrains.kotlin.android'
4-
id 'com.google.gms.google-services'
54
}
65

76
android {

app/src/main/java/com/zerodev/todo/BugReport/ReportBug.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import android.content.Context
66
import android.os.Build
77
import android.widget.Toast
88
import androidx.appcompat.app.AlertDialog
9+
import okhttp3.ResponseBody
910
import retrofit2.Call
1011
import retrofit2.Callback
1112
import retrofit2.Response
12-
import okhttp3.ResponseBody
1313
import retrofit2.Retrofit
1414
import retrofit2.converter.gson.GsonConverterFactory
1515

@@ -29,8 +29,8 @@ class ReportBug {
2929
val service = retrofit.create(DiscordApi::class.java)
3030
val webhookdata = WebhookData(message)
3131
service.sendMessage(
32-
"1191698044211703950",
33-
"ZZ_6hKT0xB2MtR6gyLIJPi6razz9PjmOpWMi2UlY0Op_JHbvM1nrhxDJ9HkmN6J_7IhC",
32+
"webhook ID",
33+
"Webhook token",
3434
webhookdata
3535
).enqueue(object : Callback<ResponseBody> {
3636
override fun onResponse(

app/src/main/java/com/zerodev/todo/TaskAdapter.kt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,20 @@ package com.zerodev.todo
33
import android.annotation.SuppressLint
44
import android.app.AlertDialog
55
import android.content.Context
6+
import android.content.res.Configuration
67
import android.graphics.Color
78
import android.graphics.Paint
8-
import android.opengl.Visibility
9-
import android.text.Spannable
10-
import android.text.SpannableString
11-
import android.text.SpannableStringBuilder
12-
import android.text.style.ForegroundColorSpan
9+
import android.graphics.PorterDuff
1310
import android.view.LayoutInflater
1411
import android.view.View
1512
import android.view.ViewGroup
1613
import android.widget.CheckBox
1714
import android.widget.ImageView
1815
import android.widget.PopupMenu
1916
import android.widget.TextView
20-
import androidx.core.content.ContextCompat
2117
import androidx.recyclerview.widget.RecyclerView
2218
import com.google.gson.Gson
2319
import java.text.SimpleDateFormat
24-
import java.time.Instant
2520
import java.util.Date
2621

2722

@@ -72,6 +67,10 @@ class TaskAdapter(private var tasks: MutableList<Task> , private val context: Co
7267
refreshSharedPref()
7368
notifyItemChanged(position)
7469
}
70+
if (isDarkMode(context))
71+
holder.moreimg.setColorFilter(Color.WHITE , PorterDuff.Mode.MULTIPLY)
72+
else
73+
holder.moreimg.setColorFilter(Color.BLACK , PorterDuff.Mode.MULTIPLY)
7574
// more details
7675
//TODO : Add a edit dialog in the next update
7776
holder.moreimg.setOnClickListener {
@@ -163,6 +162,10 @@ class TaskAdapter(private var tasks: MutableList<Task> , private val context: Co
163162

164163
return finisehdDate == today
165164
}
165+
fun isDarkMode(context: Context): Boolean {
166+
val darkModeFlag = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
167+
return darkModeFlag == Configuration.UI_MODE_NIGHT_YES
168+
}
166169

167170

168171

app/src/main/java/com/zerodev/todo/ui/aboutus/AboutUsFragment.kt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import android.os.Bundle
99
import android.view.LayoutInflater
1010
import android.view.View
1111
import android.view.ViewGroup
12-
import android.widget.TextView
1312
import androidx.fragment.app.Fragment
1413
import androidx.lifecycle.ViewModelProvider
1514
import com.zerodev.todo.databinding.FragmentAboutusBinding
@@ -47,8 +46,17 @@ class AboutUsFragment : Fragment() {
4746
}
4847
}
4948
// instagram
49+
// for now i remove the instagram
50+
binding.instagram.visibility = View.GONE
5051
binding.instagram.setOnClickListener{
51-
//TODO: add the code here
52+
val insUrl = ""
53+
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(insUrl))
54+
intent.setPackage("com.discord")
55+
if (context?.let { isIntentAvailable(it, intent) } == true) {
56+
startActivity(intent)
57+
} else {
58+
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(insUrl)))
59+
}
5260
}
5361
binding.discord.setOnClickListener{
5462
val disUrl = "https://discord.gg/FQxG3pmEB7"
@@ -60,6 +68,19 @@ class AboutUsFragment : Fragment() {
6068
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(disUrl)))
6169
}
6270
}
71+
binding.tiktok.setOnClickListener {
72+
val Url = "https://www.tiktok.com/@grandffyt?_t=8jiaWme2IUo&_r=1"
73+
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(Url))
74+
intent.setPackage("com.zhiliaoapp.musically")
75+
if (context?.let { isIntentAvailable(it, intent) } == true) {
76+
startActivity(intent)
77+
} else {
78+
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(Url)))
79+
}
80+
}
81+
binding.github.setOnClickListener {
82+
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://www.tiktok.com/@grandffyt?_t=8jiaWme2IUo&_r=1")))
83+
}
6384

6485
return root
6586
}

app/src/main/java/com/zerodev/todo/ui/home/HomeFragment.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,18 @@ class HomeFragment : Fragment() {
4343
_binding = FragmentHomeBinding.inflate(inflater, container, false)
4444

4545
binding.fab.setOnClickListener { view ->
46-
val dialogView = LayoutInflater.from(context).inflate(R.layout.new_item_dialog, null)
46+
val dialogView = LayoutInflater.from(context).inflate(R.layout.new_item_dialog , null)
47+
4748
val taskEditText = dialogView.findViewById<EditText>(R.id.taskEditText)
4849
val desc = dialogView.findViewById<EditText>(R.id.desc)
4950
val cancelButton = dialogView.findViewById<Button>(R.id.cancelButton)
5051
val addButton = dialogView.findViewById<Button>(R.id.addButton)
5152
val pickDueDate = dialogView.findViewById<Button>(R.id.pickDueDate)
53+
// we remove this for now since it dosen't work
54+
pickDueDate.visibility = View.GONE
5255
val repeatSpinner = dialogView.findViewById<Spinner>(R.id.spinner)
56+
// we remove this for now since it dosen't work
57+
repeatSpinner.visibility = View.GONE
5358
val reminderCheckBox = dialogView.findViewById<CheckBox>(R.id.reminderCheckbox)
5459
val calendar = Calendar.getInstance()
5560
val year = calendar.get(Calendar.YEAR)
@@ -161,12 +166,12 @@ class HomeFragment : Fragment() {
161166
}
162167

163168
}
164-
dialog.show()
165169
val dialogHeight = context?.let { dpToPx(450, it) }
166170
val dialogWidth = context?.let { dpToPx(400, it) }
167171
if (dialogWidth != null && dialogHeight != null) {
168172
dialog.window?.setLayout(dialogWidth, dialogHeight)
169173
}
174+
dialog.show()
170175

171176
}
172177

app/src/main/java/com/zerodev/todo/ui/settings/SettingsFragment.kt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,18 @@ import android.annotation.SuppressLint
44
import android.app.AlertDialog
55
import android.content.Context
66
import android.content.DialogInterface
7-
import android.content.Intent
87
import android.content.SharedPreferences
98
import android.graphics.Color
109
import android.os.Bundle
11-
import android.os.Environment
1210
import android.view.LayoutInflater
1311
import android.view.View
1412
import android.view.ViewGroup
15-
import android.widget.Toast
16-
import androidx.activity.result.contract.ActivityResultContracts
1713
import androidx.fragment.app.Fragment
1814
import androidx.lifecycle.ViewModelProvider
1915
import com.anggrayudi.storage.SimpleStorageHelper
2016
import com.google.android.material.snackbar.Snackbar
21-
import com.google.firebase.FirebaseApp
22-
import com.google.firebase.auth.FirebaseAuth
2317
import com.zerodev.todo.Data.NotifSounds
2418
import com.zerodev.todo.databinding.FragmentSettingsBinding
25-
import com.zerodev.todo.signupActivity
26-
import java.io.File
27-
import java.io.FileOutputStream
28-
import java.io.IOException
2919

3020
class SettingsFragment : Fragment() {
3121

@@ -54,8 +44,6 @@ class SettingsFragment : Fragment() {
5444
val settingsPref = context?.getSharedPreferences("settings", Context.MODE_PRIVATE)
5545
val notifSounds = context?.let { NotifSounds(it) }
5646
val notifSoundArray = notifSounds?.soundArray
57-
val intent = Intent(this.requireContext(), signupActivity::class.java)
58-
startActivity(intent)
5947
if (settingsPref != null) {
6048
settingsViewModel.setSharedPref(settingsPref)
6149
}
@@ -70,8 +58,6 @@ class SettingsFragment : Fragment() {
7058
binding.notifImportancetxt.text =
7159
" ${notifImportance[settingsPref.getInt("notifImportance", 0)]}"
7260
}
73-
// backup list click
74-
7561

7662
// notif sound click listener
7763
binding.notifSound.setOnClickListener {
@@ -149,10 +135,6 @@ class SettingsFragment : Fragment() {
149135
}
150136

151137

152-
153-
154-
155-
156138
override fun onDestroyView() {
157139
super.onDestroyView()
158140
_binding = null

0 commit comments

Comments
 (0)