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: |
|
path: |
|
||||||
vector/build/outputs/apk/*/release/*.apk
|
vector/build/outputs/apk/*/release/*.apk
|
||||||
|
|
||||||
# TODO: add exodus checks
|
# TODO add exodus checks
|
||||||
|
@ -122,7 +122,7 @@ allprojects {
|
|||||||
// display the corresponding rule
|
// display the corresponding rule
|
||||||
verbose = true
|
verbose = true
|
||||||
disabledRules = [
|
disabledRules = [
|
||||||
// TODO: Re-enable these 4 rules after reformatting project
|
// TODO Re-enable these 4 rules after reformatting project
|
||||||
"indent",
|
"indent",
|
||||||
"experimental:argument-list-wrapping",
|
"experimental:argument-list-wrapping",
|
||||||
"max-line-length",
|
"max-line-length",
|
||||||
|
@ -74,7 +74,7 @@ internal fun Versions.isLoginAndRegistrationSupportedBySdk(): Boolean {
|
|||||||
* Indicate if the homeserver support MSC3440 for threads
|
* Indicate if the homeserver support MSC3440 for threads
|
||||||
*/
|
*/
|
||||||
internal fun Versions.doesServerSupportThreads(): Boolean {
|
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
|
return unstableFeatures?.get(FEATURE_THREADS_MSC3440_STABLE) ?: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ internal class MXMegolmEncryption(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Default rotation periods
|
// Default rotation periods
|
||||||
// TODO: Make it configurable via parameters
|
// TODO Make it configurable via parameters
|
||||||
// Session rotation periods
|
// Session rotation periods
|
||||||
private var sessionRotationPeriodMsgs: Int = 100
|
private var sessionRotationPeriodMsgs: Int = 100
|
||||||
private var sessionRotationPeriodMs: Int = 7 * 24 * 3600 * 1000
|
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 {
|
override suspend fun encryptEventContent(eventContent: Content, eventType: String, userIds: List<String>): Content {
|
||||||
// pick the list of recipients based on the membership list.
|
// 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)
|
ensureSession(userIds)
|
||||||
val deviceInfos = ArrayList<CryptoDeviceInfo>()
|
val deviceInfos = ArrayList<CryptoDeviceInfo>()
|
||||||
for (userId in userIds) {
|
for (userId in userIds) {
|
||||||
|
@ -22,7 +22,7 @@ import javax.inject.Inject
|
|||||||
@SessionScope
|
@SessionScope
|
||||||
internal class WarnOnUnknownDeviceRepository @Inject constructor() {
|
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.
|
// Warn the user if some new devices are detected while encrypting a message.
|
||||||
private var warnOnUnknownDevices = false
|
private var warnOnUnknownDevices = false
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ internal object CertUtil {
|
|||||||
builder.supportsTlsExtensions(hsConfig.shouldAcceptTlsExtensions)
|
builder.supportsTlsExtensions(hsConfig.shouldAcceptTlsExtensions)
|
||||||
val list = ArrayList<ConnectionSpec>()
|
val list = ArrayList<ConnectionSpec>()
|
||||||
list.add(builder.build())
|
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://")) {
|
if (hsConfig.allowHttpExtension || hsConfig.homeServerUriBase.toString().startsWith("http://")) {
|
||||||
list.add(ConnectionSpec.CLEARTEXT)
|
list.add(ConnectionSpec.CLEARTEXT)
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ internal class DefaultFileService @Inject constructor(
|
|||||||
|
|
||||||
Timber.v("## FileService downloadFile $url")
|
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 existingDownload = synchronized(ongoing) {
|
||||||
val existing = ongoing[url]
|
val existing = ongoing[url]
|
||||||
if (existing != null) {
|
if (existing != null) {
|
||||||
|
@ -29,6 +29,6 @@ internal data class GroupSummaryRoomsSection(
|
|||||||
|
|
||||||
@Json(name = "rooms") val rooms: List<String> = emptyList()
|
@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;
|
// public Map<Object, Object> categories;
|
||||||
)
|
)
|
||||||
|
@ -30,6 +30,6 @@ internal data class GroupSummaryUsersSection(
|
|||||||
|
|
||||||
@Json(name = "users") val users: List<String> = emptyList()
|
@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;
|
// public Map<Object, Object> roles;
|
||||||
)
|
)
|
||||||
|
@ -68,7 +68,7 @@ internal class DefaultSessionAccountDataService @Inject constructor(
|
|||||||
val params = UpdateUserAccountDataTask.AnyParams(type = type, any = content)
|
val params = UpdateUserAccountDataTask.AnyParams(type = type, any = content)
|
||||||
awaitCallback<Unit> { callback ->
|
awaitCallback<Unit> { callback ->
|
||||||
updateUserAccountDataTask.configureWith(params) {
|
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
|
this.callback = callback
|
||||||
}
|
}
|
||||||
.executeBy(taskExecutor)
|
.executeBy(taskExecutor)
|
||||||
|
@ -151,7 +151,7 @@ internal class DefaultWidgetPostAPIMediator @Inject constructor(private val mosh
|
|||||||
override fun sendError(message: String, eventData: JsonDict) {
|
override fun sendError(message: String, eventData: JsonDict) {
|
||||||
Timber.e("## sendError() : eventData $eventData failed $message")
|
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 params = HashMap<String, Map<String, String>>()
|
||||||
val subMap = HashMap<String, String>()
|
val subMap = HashMap<String, String>()
|
||||||
subMap["message"] = message
|
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.ToolbarConfigurable
|
||||||
import im.vector.app.core.platform.VectorBaseActivity
|
import im.vector.app.core.platform.VectorBaseActivity
|
||||||
|
|
||||||
//TODO: add this activity to manifest
|
//TODO add this activity to manifest
|
||||||
class ${activityClass} : VectorBaseActivity(), ToolbarConfigurable {
|
class ${activityClass} : VectorBaseActivity(), ToolbarConfigurable {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -18,7 +18,7 @@ import javax.inject.Inject
|
|||||||
data class ${fragmentArgsClass}() : Parcelable
|
data class ${fragmentArgsClass}() : Parcelable
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
//TODO: add this fragment into FragmentModule
|
//TODO add this fragment into FragmentModule
|
||||||
class ${fragmentClass} @Inject constructor(
|
class ${fragmentClass} @Inject constructor(
|
||||||
private val viewModelFactory: ${viewModelClass}.Factory
|
private val viewModelFactory: ${viewModelClass}.Factory
|
||||||
) : VectorBaseFragment(), ${viewModelClass}.Factory by viewModelFactory {
|
) : VectorBaseFragment(), ${viewModelClass}.Factory by viewModelFactory {
|
||||||
|
@ -87,7 +87,7 @@ class ActiveSessionHolder @Inject constructor(private val activeSessionDataSourc
|
|||||||
?: throw IllegalStateException("You should authenticate before using this")
|
?: throw IllegalStateException("You should authenticate before using this")
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Stop sync ?
|
// TODO Stop sync ?
|
||||||
// fun switchToSession(sessionParams: SessionParams) {
|
// fun switchToSession(sessionParams: SessionParams) {
|
||||||
// val newActiveSession = authenticationService.getSession(sessionParams)
|
// val newActiveSession = authenticationService.getSession(sessionParams)
|
||||||
// activeSession.set(newActiveSession)
|
// activeSession.set(newActiveSession)
|
||||||
|
@ -134,7 +134,7 @@ object VectorStaticModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
fun providesCurrentSession(activeSessionHolder: ActiveSessionHolder): Session {
|
fun providesCurrentSession(activeSessionHolder: ActiveSessionHolder): Session {
|
||||||
// TODO: handle session injection better
|
// TODO handle session injection better
|
||||||
return activeSessionHolder.getActiveSession()
|
return activeSessionHolder.getActiveSession()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,8 +44,8 @@ import javax.inject.Inject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* TODO: Loading indicator while getting emoji data source?
|
* TODO Loading indicator while getting emoji data source?
|
||||||
* TODO: Finish Refactor to vector base activity
|
* TODO Finish Refactor to vector base activity
|
||||||
*/
|
*/
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class EmojiReactionPickerActivity : VectorBaseActivity<ActivityEmojiReactionPickerBinding>(),
|
class EmojiReactionPickerActivity : VectorBaseActivity<ActivityEmojiReactionPickerBinding>(),
|
||||||
|
@ -41,9 +41,9 @@ import kotlin.math.abs
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* TODO: Configure Span using available width and emoji size
|
* TODO Configure Span using available width and emoji size
|
||||||
* TODO: Performances
|
* TODO Performances
|
||||||
* TODO: Scroll to section - Find a way to snap section to the top
|
* TODO Scroll to section - Find a way to snap section to the top
|
||||||
*/
|
*/
|
||||||
class EmojiRecyclerAdapter @Inject constructor() :
|
class EmojiRecyclerAdapter @Inject constructor() :
|
||||||
RecyclerView.Adapter<EmojiRecyclerAdapter.ViewHolder>() {
|
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 {
|
viewModelScope.launch {
|
||||||
runCatching { session.roomService().createRoom(createRoomParams) }.fold(
|
runCatching { session.roomService().createRoom(createRoomParams) }.fold(
|
||||||
{ roomId ->
|
{ roomId ->
|
||||||
|
Loading…
Reference in New Issue
Block a user