mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-26 15:18:19 +08:00
"TODO:" is forbidden by Detekt
This commit is contained in:
parent
d8cda04e14
commit
824f029e20
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -67,4 +67,4 @@ jobs:
|
||||
path: |
|
||||
vector/build/outputs/apk/*/release/*.apk
|
||||
|
||||
# TODO: add exodus checks
|
||||
# TODO add exodus checks
|
||||
|
@ -122,7 +122,7 @@ allprojects {
|
||||
// display the corresponding rule
|
||||
verbose = true
|
||||
disabledRules = [
|
||||
// TODO: Re-enable these 4 rules after reformatting project
|
||||
// TODO Re-enable these 4 rules after reformatting project
|
||||
"indent",
|
||||
"experimental:argument-list-wrapping",
|
||||
"max-line-length",
|
||||
|
@ -74,7 +74,7 @@ internal fun Versions.isLoginAndRegistrationSupportedBySdk(): Boolean {
|
||||
* Indicate if the homeserver support MSC3440 for threads
|
||||
*/
|
||||
internal fun Versions.doesServerSupportThreads(): Boolean {
|
||||
// TODO: Check for v1.3 or whichever spec version formally specifies MSC3440.
|
||||
// TODO Check for v1.3 or whichever spec version formally specifies MSC3440.
|
||||
return unstableFeatures?.get(FEATURE_THREADS_MSC3440_STABLE) ?: false
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ internal class MXMegolmEncryption(
|
||||
}
|
||||
|
||||
// Default rotation periods
|
||||
// TODO: Make it configurable via parameters
|
||||
// TODO Make it configurable via parameters
|
||||
// Session rotation periods
|
||||
private var sessionRotationPeriodMsgs: Int = 100
|
||||
private var sessionRotationPeriodMs: Int = 7 * 24 * 3600 * 1000
|
||||
|
@ -38,7 +38,7 @@ internal class MXOlmEncryption(
|
||||
override suspend fun encryptEventContent(eventContent: Content, eventType: String, userIds: List<String>): Content {
|
||||
// pick the list of recipients based on the membership list.
|
||||
//
|
||||
// TODO: there is a race condition here! What if a new user turns up
|
||||
// TODO there is a race condition here! What if a new user turns up
|
||||
ensureSession(userIds)
|
||||
val deviceInfos = ArrayList<CryptoDeviceInfo>()
|
||||
for (userId in userIds) {
|
||||
|
@ -22,7 +22,7 @@ import javax.inject.Inject
|
||||
@SessionScope
|
||||
internal class WarnOnUnknownDeviceRepository @Inject constructor() {
|
||||
|
||||
// TODO: set it back to true by default. Need UI
|
||||
// TODO set it back to true by default. Need UI
|
||||
// Warn the user if some new devices are detected while encrypting a message.
|
||||
private var warnOnUnknownDevices = false
|
||||
|
||||
|
@ -250,7 +250,7 @@ internal object CertUtil {
|
||||
builder.supportsTlsExtensions(hsConfig.shouldAcceptTlsExtensions)
|
||||
val list = ArrayList<ConnectionSpec>()
|
||||
list.add(builder.build())
|
||||
// TODO: we should display a warning if user enter an http url
|
||||
// TODO we should display a warning if user enter an http url
|
||||
if (hsConfig.allowHttpExtension || hsConfig.homeServerUriBase.toString().startsWith("http://")) {
|
||||
list.add(ConnectionSpec.CLEARTEXT)
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ internal class DefaultFileService @Inject constructor(
|
||||
|
||||
Timber.v("## FileService downloadFile $url")
|
||||
|
||||
// TODO: Remove use of `synchronized` in suspend function.
|
||||
// TODO Remove use of `synchronized` in suspend function.
|
||||
val existingDownload = synchronized(ongoing) {
|
||||
val existing = ongoing[url]
|
||||
if (existing != null) {
|
||||
|
@ -29,6 +29,6 @@ internal data class GroupSummaryRoomsSection(
|
||||
|
||||
@Json(name = "rooms") val rooms: List<String> = emptyList()
|
||||
|
||||
// @TODO: Check the meaning and the usage of these categories. This dictionary is empty FTM.
|
||||
// TODO Check the meaning and the usage of these categories. This dictionary is empty FTM.
|
||||
// public Map<Object, Object> categories;
|
||||
)
|
||||
|
@ -30,6 +30,6 @@ internal data class GroupSummaryUsersSection(
|
||||
|
||||
@Json(name = "users") val users: List<String> = emptyList()
|
||||
|
||||
// @TODO: Check the meaning and the usage of these roles. This dictionary is empty FTM.
|
||||
// TODO Check the meaning and the usage of these roles. This dictionary is empty FTM.
|
||||
// public Map<Object, Object> roles;
|
||||
)
|
||||
|
@ -68,7 +68,7 @@ internal class DefaultSessionAccountDataService @Inject constructor(
|
||||
val params = UpdateUserAccountDataTask.AnyParams(type = type, any = content)
|
||||
awaitCallback<Unit> { callback ->
|
||||
updateUserAccountDataTask.configureWith(params) {
|
||||
this.retryCount = 5 // TODO: Need to refactor retrying out into a helper method.
|
||||
this.retryCount = 5 // TODO Need to refactor retrying out into a helper method.
|
||||
this.callback = callback
|
||||
}
|
||||
.executeBy(taskExecutor)
|
||||
|
@ -151,7 +151,7 @@ internal class DefaultWidgetPostAPIMediator @Inject constructor(private val mosh
|
||||
override fun sendError(message: String, eventData: JsonDict) {
|
||||
Timber.e("## sendError() : eventData $eventData failed $message")
|
||||
|
||||
// TODO: JS has an additional optional parameter: nestedError
|
||||
// TODO JS has an additional optional parameter: nestedError
|
||||
val params = HashMap<String, Map<String, String>>()
|
||||
val subMap = HashMap<String, String>()
|
||||
subMap["message"] = message
|
||||
|
@ -8,7 +8,7 @@ import im.vector.app.core.extensions.addFragment
|
||||
import im.vector.app.core.platform.ToolbarConfigurable
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
|
||||
//TODO: add this activity to manifest
|
||||
//TODO add this activity to manifest
|
||||
class ${activityClass} : VectorBaseActivity(), ToolbarConfigurable {
|
||||
|
||||
companion object {
|
||||
|
@ -18,7 +18,7 @@ import javax.inject.Inject
|
||||
data class ${fragmentArgsClass}() : Parcelable
|
||||
</#if>
|
||||
|
||||
//TODO: add this fragment into FragmentModule
|
||||
//TODO add this fragment into FragmentModule
|
||||
class ${fragmentClass} @Inject constructor(
|
||||
private val viewModelFactory: ${viewModelClass}.Factory
|
||||
) : VectorBaseFragment(), ${viewModelClass}.Factory by viewModelFactory {
|
||||
|
@ -87,7 +87,7 @@ class ActiveSessionHolder @Inject constructor(private val activeSessionDataSourc
|
||||
?: throw IllegalStateException("You should authenticate before using this")
|
||||
}
|
||||
|
||||
// TODO: Stop sync ?
|
||||
// TODO Stop sync ?
|
||||
// fun switchToSession(sessionParams: SessionParams) {
|
||||
// val newActiveSession = authenticationService.getSession(sessionParams)
|
||||
// activeSession.set(newActiveSession)
|
||||
|
@ -134,7 +134,7 @@ object VectorStaticModule {
|
||||
|
||||
@Provides
|
||||
fun providesCurrentSession(activeSessionHolder: ActiveSessionHolder): Session {
|
||||
// TODO: handle session injection better
|
||||
// TODO handle session injection better
|
||||
return activeSessionHolder.getActiveSession()
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,8 @@ import javax.inject.Inject
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO: Loading indicator while getting emoji data source?
|
||||
* TODO: Finish Refactor to vector base activity
|
||||
* TODO Loading indicator while getting emoji data source?
|
||||
* TODO Finish Refactor to vector base activity
|
||||
*/
|
||||
@AndroidEntryPoint
|
||||
class EmojiReactionPickerActivity : VectorBaseActivity<ActivityEmojiReactionPickerBinding>(),
|
||||
|
@ -41,9 +41,9 @@ import kotlin.math.abs
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO: Configure Span using available width and emoji size
|
||||
* TODO: Performances
|
||||
* TODO: Scroll to section - Find a way to snap section to the top
|
||||
* TODO Configure Span using available width and emoji size
|
||||
* TODO Performances
|
||||
* TODO Scroll to section - Find a way to snap section to the top
|
||||
*/
|
||||
class EmojiRecyclerAdapter @Inject constructor() :
|
||||
RecyclerView.Adapter<EmojiRecyclerAdapter.ViewHolder>() {
|
||||
|
@ -297,7 +297,7 @@ class CreateRoomViewModel @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Should this be non-cancellable?
|
||||
// TODO Should this be non-cancellable?
|
||||
viewModelScope.launch {
|
||||
runCatching { session.roomService().createRoom(createRoomParams) }.fold(
|
||||
{ roomId ->
|
||||
|
Loading…
Reference in New Issue
Block a user