Skip to content

Commit

Permalink
remove faqCategory parameter and faq categories.
Browse files Browse the repository at this point in the history
  • Loading branch information
mopsalarm committed Mar 6, 2024
1 parent dda3b92 commit 8c80c19
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/pr0gramm/app/services/ContactService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import java.util.Locale
* A simple service that allows sending a message to the pr0gramm support.
*/
class ContactService(private val api: Api) {
suspend fun post(faqCategory: String, email: String, subject: String, message: String) {
suspend fun post(email: String, subject: String, message: String) {
val version = BuildConfig.VERSION_NAME
val androidVersion = Build.VERSION.RELEASE

Expand All @@ -30,7 +30,7 @@ class ContactService(private val api: Api) {
toString()
}

api.contactSend(faqCategory, subject, email, msg, extraText = DeviceInfoService.generate())
api.contactSend(subject, email, msg, extraText = DeviceInfoService.generate())
}

suspend fun report(itemId: Long, comment: Long, reason: String) {
Expand Down
16 changes: 4 additions & 12 deletions app/src/main/java/com/pr0gramm/app/ui/ContactActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class ContactActivity : BaseAppCompatActivity("ContactActivity") {
}

withContext(Dispatchers.IO + NonCancellable) {
contactService.post(category.category, email, subject, feedback)
contactService.post(email, subject, feedback)
}
}

Expand All @@ -177,15 +177,7 @@ private class Category(val category: String, val text: String) {
}

private val faqCategories = listOf(
Category("none", "Kategorie auswählen"),
Category("app", "App"),
Category("rules", "Regeln"),
Category("account", "Account"),
Category("pr0mium", "pr0mium"),
Category("deletions", "Löschanfragen"),
Category("technical", "Bugs"),
Category("helpers", "Helfer"),
Category("others", "Sonstiges"),
Category("glossary", "Glossar"),
Category("invites", "Invites"),
Category("none", "Kategorie auswählen"),
Category("app", "App"),
Category("pr0gramm", "pr0gramm"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class DigestsFragment : BaseFragment("DigestsFragment", R.layout.fragment_inbox)
}

private fun updateAdapterValues() {
val context = context ?: return
context ?: return

val values = state.digests.flatMap { digest ->
listOf(digest) + digest.items
Expand Down
1 change: 0 additions & 1 deletion model/src/main/java/com/pr0gramm/app/api/pr0gramm/Api.kt
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ interface Api {
@FormUrlEncoded
@POST("api/contact/send")
suspend fun contactSend(
@Field("faqCategory") faqCategory: String,
@Field("subject") subject: String,
@Field("email") email: String,
@Field("message") message: String,
Expand Down

0 comments on commit 8c80c19

Please sign in to comment.