Skip to content

Commit 9d2a030

Browse files
committed
Remove extensions repo
1 parent ea3e53e commit 9d2a030

File tree

11 files changed

+36
-109
lines changed

11 files changed

+36
-109
lines changed

.github/ISSUE_TEMPLATE/config.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: ⚠️ Extension/source issue
4-
url: https://github.com/komikku-app/extensions/issues/new/choose
5-
about: Issues and requests for official extensions and sources should be opened in the extensions repository instead
6-
- name: 📦 Extensions
7-
url: https://komikku-app.github.io/komikku-extensions/
8-
about: List of all available extensions with download links
9-
- name: 🖥️ Mihon website
10-
url: https://mihon.app/
3+
- name: 🖥️ Komikku website
4+
url: https://komikku-app.github.io/
115
about: Guides, troubleshooting, and answers to common questions

.github/ISSUE_TEMPLATE/report_issue.yml

-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ body:
9494
required: true
9595
- label: I have written a short but informative title.
9696
required: true
97-
- label: If this is an issue with an official extension, I should be opening an issue in the [extensions repository](https://github.com/komikku-app/extensions/issues/new/choose).
98-
required: true
9997
- label: I have gone through the [FAQ](https://mihon.app/docs/faq/general) and [troubleshooting guide](https://mihon.app/docs/guides/troubleshooting/).
10098
required: true
10199
- label: I have updated the app to version **[1.12.1](https://github.com/komikku-app/komikku/releases/latest)**.

.github/ISSUE_TEMPLATE/request_feature.yml

-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ body:
3131
required: true
3232
- label: I have written a short but informative title.
3333
required: true
34-
- label: If this is an issue with an official extension, I should be opening an issue in the [extensions repository](https://github.com/komikku-app/extensions/issues/new/choose).
35-
required: true
3634
- label: I have updated the app to version **[1.12.1](https://github.com/komikku-app/komikku/releases/latest)**.
3735
required: true
3836
- label: I will fill out all of the requested information in this form.

app/src/main/java/eu/kanade/domain/extension/interactor/TrustExtension.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TrustExtension(
1414

1515
suspend fun isTrusted(pkgInfo: PackageInfo, fingerprints: List<String>): Boolean {
1616
// KMK -->
17-
if (fingerprints.contains(CreateExtensionRepo.OFFICIAL_REPO_SIGNATURE)) return true
17+
if (fingerprints.contains(CreateExtensionRepo.KOMIKKU_SIGNATURE)) return true
1818
// KMK <--
1919
val trustedFingerprints = extensionRepoRepository.getAll().map { it.signingKeyFingerprint }.toHashSet()
2020
val key = "${pkgInfo.packageName}:${PackageInfoCompat.getLongVersionCode(pkgInfo)}:${fingerprints.last()}"

app/src/main/java/eu/kanade/presentation/more/settings/screen/browse/components/ExtensionReposContent.kt

+8-6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import eu.kanade.tachiyomi.R
3636
import eu.kanade.tachiyomi.util.system.copyToClipboard
3737
import kotlinx.collections.immutable.ImmutableSet
3838
import kotlinx.collections.immutable.persistentSetOf
39+
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KEIYOUSHI_SIGNATURE
40+
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KOMIKKU_SIGNATURE
3941
import mihon.domain.extensionrepo.model.ExtensionRepo
4042
import tachiyomi.i18n.MR
4143
import tachiyomi.presentation.core.components.material.padding
@@ -101,7 +103,7 @@ private fun ExtensionRepoListItem(
101103
modifier = Modifier
102104
.padding(start = MaterialTheme.padding.medium),
103105
) {
104-
val resId = repoResId(repo.baseUrl)
106+
val resId = repoResId(repo.signingKeyFingerprint)
105107
Image(
106108
bitmap = ImageBitmap.imageResource(id = resId),
107109
contentDescription = null,
@@ -179,18 +181,18 @@ private fun ExtensionRepoListItem(
179181
}
180182

181183
// KMK -->
182-
fun repoResId(baseUrl: String) = when (baseUrl) {
183-
"https://raw.githubusercontent.com/komikku-app/extensions/repo" -> R.mipmap.komikku
184-
"https://raw.githubusercontent.com/keiyoushi/extensions/repo" -> R.mipmap.keiyoushi
184+
fun repoResId(signKey: String) = when (signKey) {
185+
KOMIKKU_SIGNATURE -> R.mipmap.komikku
186+
KEIYOUSHI_SIGNATURE -> R.mipmap.keiyoushi
185187
else -> R.mipmap.extension
186188
}
187189

188190
@Preview
189191
@Composable
190192
fun ExtensionReposContentPreview() {
191193
val repos = persistentSetOf(
192-
ExtensionRepo("https://raw.githubusercontent.com/komikku-app/extensions/repo", "Komikku", "", "", "key1"),
193-
ExtensionRepo("https://raw.githubusercontent.com/keiyoushi/extensions/repo", "Keiyoushi", "", "", "key2"),
194+
ExtensionRepo("https://repo", "Komikku", "", "", KOMIKKU_SIGNATURE),
195+
ExtensionRepo("https://repo", "Keiyoushi", "", "", KEIYOUSHI_SIGNATURE),
194196
ExtensionRepo("https://repo", "Other", "", "", "key2"),
195197
)
196198
ExtensionReposContent(

app/src/main/java/eu/kanade/presentation/more/settings/screen/browse/components/ExtensionReposDialogs.kt

+12-45
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package eu.kanade.presentation.more.settings.screen.browse.components
22

3-
import androidx.compose.foundation.layout.Arrangement
43
import androidx.compose.foundation.layout.Column
5-
import androidx.compose.foundation.layout.Row
6-
import androidx.compose.foundation.layout.fillMaxWidth
74
import androidx.compose.foundation.text.KeyboardOptions
85
import androidx.compose.material3.AlertDialog
96
import androidx.compose.material3.OutlinedTextField
@@ -15,16 +12,12 @@ import androidx.compose.runtime.getValue
1512
import androidx.compose.runtime.mutableStateOf
1613
import androidx.compose.runtime.remember
1714
import androidx.compose.runtime.setValue
18-
import androidx.compose.ui.Alignment
1915
import androidx.compose.ui.Modifier
2016
import androidx.compose.ui.focus.FocusRequester
2117
import androidx.compose.ui.focus.focusRequester
2218
import androidx.compose.ui.text.input.KeyboardType
23-
import androidx.compose.ui.tooling.preview.Preview
2419
import kotlinx.collections.immutable.ImmutableSet
25-
import kotlinx.collections.immutable.persistentSetOf
2620
import kotlinx.coroutines.delay
27-
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.OFFICIAL_REPO_BASE_URL
2821
import mihon.domain.extensionrepo.model.ExtensionRepo
2922
import tachiyomi.i18n.MR
3023
import tachiyomi.presentation.core.i18n.stringResource
@@ -44,37 +37,19 @@ fun ExtensionRepoCreateDialog(
4437
AlertDialog(
4538
onDismissRequest = onDismissRequest,
4639
confirmButton = {
47-
// KMK -->
48-
Row(
49-
modifier = Modifier.fillMaxWidth(),
50-
horizontalArrangement = Arrangement.SpaceBetween, // Distribute space between items
51-
verticalAlignment = Alignment.CenterVertically, // Align items vertically
40+
TextButton(
41+
enabled = name.isNotEmpty() && !nameAlreadyExists,
42+
onClick = {
43+
onCreate(name)
44+
onDismissRequest()
45+
},
5246
) {
53-
TextButton(
54-
onClick = {
55-
name = "$OFFICIAL_REPO_BASE_URL/index.min.json"
56-
},
57-
) {
58-
Text(text = stringResource(MR.strings.label_default))
59-
}
60-
Row(
61-
// Group the right-aligned elements
62-
verticalAlignment = Alignment.CenterVertically,
63-
) {
64-
TextButton(onClick = onDismissRequest) {
65-
Text(text = stringResource(MR.strings.action_cancel))
66-
}
67-
// KMK <--
68-
TextButton(
69-
enabled = name.isNotEmpty() && !nameAlreadyExists,
70-
onClick = {
71-
onCreate(name)
72-
onDismissRequest()
73-
},
74-
) {
75-
Text(text = stringResource(MR.strings.action_add))
76-
}
77-
}
47+
Text(text = stringResource(MR.strings.action_add))
48+
}
49+
},
50+
dismissButton = {
51+
TextButton(onClick = onDismissRequest) {
52+
Text(text = stringResource(MR.strings.action_cancel))
7853
}
7954
},
8055
title = {
@@ -115,14 +90,6 @@ fun ExtensionRepoCreateDialog(
11590
}
11691
}
11792

118-
// KMK -->
119-
@Preview(showBackground = true)
120-
@Composable
121-
fun ExtensionRepoCreateDialogPreview() {
122-
ExtensionRepoCreateDialog({ }, { }, persistentSetOf())
123-
}
124-
// KMK <--
125-
12693
@Composable
12794
fun ExtensionRepoDeleteDialog(
12895
onDismissRequest: () -> Unit,

app/src/main/java/eu/kanade/presentation/more/settings/screen/browse/components/ExtensionReposScreen.kt

+6-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ import eu.kanade.presentation.components.AppBar
2424
import eu.kanade.presentation.more.settings.screen.browse.RepoScreenState
2525
import eu.kanade.tachiyomi.util.system.openInBrowser
2626
import kotlinx.collections.immutable.persistentSetOf
27-
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.OFFICIAL_REPO_WEBSITE
27+
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KEIYOUSHI_SIGNATURE
28+
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KOMIKKU_SIGNATURE
29+
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.REPO_HELP
2830
import mihon.domain.extensionrepo.model.ExtensionRepo
2931
import tachiyomi.i18n.MR
3032
import tachiyomi.presentation.core.components.material.Scaffold
@@ -79,7 +81,7 @@ fun ExtensionReposScreen(
7981
// KMK -->
8082
help = {
8183
TextButton(
82-
onClick = { context.openInBrowser(OFFICIAL_REPO_WEBSITE) },
84+
onClick = { context.openInBrowser(REPO_HELP) },
8385
modifier = Modifier.padding(top = MaterialTheme.padding.small),
8486
) {
8587
Icon(imageVector = Icons.AutoMirrored.Outlined.Help, contentDescription = null)
@@ -114,8 +116,8 @@ fun ExtensionReposScreen(
114116
private fun ExtensionReposScreenPreview() {
115117
val state = RepoScreenState.Success(
116118
repos = persistentSetOf(
117-
ExtensionRepo("https://raw.githubusercontent.com/komikku-app/extensions/repo", "Komikku", "", "", "key1"),
118-
ExtensionRepo("https://raw.githubusercontent.com/keiyoushi/extensions/repo", "Keiyoushi", "", "", "key2"),
119+
ExtensionRepo("https://repo", "Komikku", "", "", KOMIKKU_SIGNATURE),
120+
ExtensionRepo("https://repo", "Keiyoushi", "", "", KEIYOUSHI_SIGNATURE),
119121
ExtensionRepo("https://repo", "Other", "", "", "key2"),
120122
),
121123
disabledRepos = setOf("https://repo"),

app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import kotlinx.coroutines.async
2020
import kotlinx.coroutines.awaitAll
2121
import kotlinx.coroutines.runBlocking
2222
import logcat.LogPriority
23-
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KEIYOUSHI_REPO_SIGNATURE
24-
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.OFFICIAL_REPO_SIGNATURE
23+
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KEIYOUSHI_SIGNATURE
24+
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KOMIKKU_SIGNATURE
2525
import mihon.domain.extensionrepo.interactor.GetExtensionRepo
2626
import mihon.domain.extensionrepo.model.ExtensionRepo
2727
import tachiyomi.core.common.util.system.logcat
@@ -428,11 +428,11 @@ internal object ExtensionLoader {
428428
}
429429

430430
private fun isOfficiallySigned(signatures: List<String>): Boolean {
431-
return signatures.all { it == OFFICIAL_REPO_SIGNATURE }
431+
return signatures.all { it == KOMIKKU_SIGNATURE }
432432
}
433433

434434
private fun isKeiyoushiSigned(signatures: List<String>): Boolean {
435-
return signatures.all { it == KEIYOUSHI_REPO_SIGNATURE }
435+
return signatures.all { it == KEIYOUSHI_SIGNATURE }
436436
}
437437

438438
/**

app/src/main/java/mihon/core/migration/migrations/Migrations.kt

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ val migrations: List<Migration>
4646
MoveEncryptionSettingsToAppStateMigration(),
4747
TrustExtensionRepositoryMigration(),
4848
// KMK -->
49-
OfficialExtensionRepositoryMigration(),
5049
IntegratedHentaiMigration(),
5150
SetupAppUpdateMigration(),
5251
// KMK <--

app/src/main/java/mihon/core/migration/migrations/OfficialExtensionRepositoryMigration.kt

-32
This file was deleted.

domain/src/main/java/mihon/domain/extensionrepo/interactor/CreateExtensionRepo.kt

+3-4
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,10 @@ class CreateExtensionRepo(
7171
}
7272

7373
companion object {
74-
const val OFFICIAL_REPO_WEBSITE = "https://komikku-app.github.io"
75-
const val OFFICIAL_REPO_BASE_URL = "https://raw.githubusercontent.com/komikku-app/extensions/repo"
74+
const val REPO_HELP = "https://komikku-app.github.io/docs/guides/getting-started#adding-sources"
7675

7776
// cuong-tran's key
78-
const val OFFICIAL_REPO_SIGNATURE = "cbec121aa82ebb02aaa73806992e0368a97d47b5451ed6524816d03084c45905"
79-
const val KEIYOUSHI_REPO_SIGNATURE = "9add655a78e96c4ec7a53ef89dccb557cb5d767489fac5e785d671a5a75d4da2"
77+
const val KOMIKKU_SIGNATURE = "cbec121aa82ebb02aaa73806992e0368a97d47b5451ed6524816d03084c45905"
78+
const val KEIYOUSHI_SIGNATURE = "9add655a78e96c4ec7a53ef89dccb557cb5d767489fac5e785d671a5a75d4da2"
8079
}
8180
}

0 commit comments

Comments
 (0)