-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/489 transfer session to another screen #501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Feature/489 transfer session to another screen #501
Conversation
app/src/main/java/uk/co/sentinelweb/cuer/app/ui/exoplayer/ExoLoggingPlayerListener.kt
Fixed
Show fixed
Hide fixed
app/src/main/java/uk/co/sentinelweb/cuer/app/ui/exoplayer/ExoLoggingPlayerListener.kt
Fixed
Show fixed
Hide fixed
private fun Header(model: CastDialogModel) { | ||
Box( | ||
modifier = Modifier.height(100.dp) | ||
modifier = Modifier.height(108.dp) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
contentDescription = "Cuer cast transfer", | ||
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface), | ||
modifier = Modifier | ||
.size(48.dp) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface), | ||
modifier = Modifier | ||
.size(48.dp) | ||
.padding(8.dp) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
color = contentColor, | ||
style = MaterialTheme.typography.headlineSmall, | ||
modifier = Modifier | ||
.padding(start = 8.dp), |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
shared/src/commonMain/kotlin/uk/co/sentinelweb/cuer/app/ui/remotes/RemotesComposables.kt
Fixed
Show fixed
Hide fixed
colorFilter = ColorFilter.tint(contentColor), | ||
modifier = Modifier | ||
.padding(8.dp) | ||
.size(24.dp) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
color = contentColor, | ||
style = MaterialTheme.typography.headlineSmall, | ||
modifier = Modifier | ||
.padding(horizontal = 8.dp, vertical = 4.dp), |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
color = contentColor, | ||
style = MaterialTheme.typography.headlineSmall, | ||
modifier = Modifier | ||
.padding(horizontal = 8.dp, vertical = 4.dp), |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
import uk.co.sentinelweb.cuer.domain.ext.serialise | ||
|
||
class NavigationRouter ( | ||
class NavigationRouter( |
Check warning
Code scanning / detekt
The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists. Warning
import androidx.compose.foundation.gestures.detectTapGestures | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.runtime.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.MviStore.Label.Command | ||
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.MviStore.Label.None | ||
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.PlayerCommand | ||
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.View.Event.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.View.Event.* | ||
import uk.co.sentinelweb.cuer.app.util.disk.FullTruncatedPathMapper | ||
import uk.co.sentinelweb.cuer.core.wrapper.LogWrapper | ||
import uk.co.sentinelweb.cuer.domain.PlayerStateDomain.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning
private val fullTruncatedPathMapper: FullTruncatedPathMapper by inject() | ||
|
||
@Composable | ||
fun AndroidVideoUi(view: AndroidVideoPlayerActivity.MviViewImpl) { |
Check warning
Code scanning / detekt
One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning
@UnstableApi | ||
class LoggingPlayerListener( | ||
private val tag: String = "LoggingPlayerListener" | ||
class ExoLoggingPlayerListener( |
Check warning
Code scanning / detekt
Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning
PlaybackException.ERROR_CODE_DECODER_INIT_FAILED -> "ERROR_CODE_DECODER_INIT_FAILED" | ||
PlaybackException.ERROR_CODE_DECODER_QUERY_FAILED -> "ERROR_CODE_DECODER_QUERY_FAILED" | ||
PlaybackException.ERROR_CODE_DECODING_FAILED -> "ERROR_CODE_DECODING_FAILED" | ||
PlaybackException.ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES -> "ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES" |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style. Warning
PowerManager.SCREEN_BRIGHT_WAKE_LOCK or PowerManager.ON_AFTER_RELEASE, | ||
"MyApp:VideoWakeLock" | ||
).apply { | ||
acquire(30 * 60 * 1000L) // 30 minutes timeout |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
PowerManager.SCREEN_BRIGHT_WAKE_LOCK or PowerManager.ON_AFTER_RELEASE, | ||
"MyApp:VideoWakeLock" | ||
).apply { | ||
acquire(30 * 60 * 1000L) // 30 minutes timeout |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
PowerManager.SCREEN_BRIGHT_WAKE_LOCK or PowerManager.ON_AFTER_RELEASE, | ||
"MyApp:VideoWakeLock" | ||
).apply { | ||
acquire(30 * 60 * 1000L) // 30 minutes timeout |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
fontFamily = LexendDora, | ||
fontWeight = fontWeightTitle, | ||
fontSize = 28.sp | ||
fontSize = 20.sp |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
fontFamily = LexendDora, | ||
fontWeight = fontWeightTitle, | ||
fontSize = 24.sp | ||
fontSize = 18.sp |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
fontFamily = LexendDora, | ||
fontWeight = fontWeightTitle, | ||
fontSize = 20.sp | ||
fontSize = 16.sp |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
|
||
@Composable | ||
fun View() { | ||
fun TestView() { |
Check warning
Code scanning / detekt
One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning
@@ -0,0 +1,54 @@ | |||
package uk.co.sentinelweb.cuer.hub.util.sleep |
Check warning
Code scanning / detekt
Checks whether files end with a line separator. Warning
val INSTANCE = Native.load("kernel32", Kernel32Extended::class.java) | ||
} | ||
|
||
fun SetThreadExecutionState(esFlags: EXECUTION_STATE): EXECUTION_STATE |
Check warning
Code scanning / detekt
Function names should follow the naming convention set in the configuration. Warning
} | ||
|
||
@Structure.FieldOrder("value") | ||
class EXECUTION_STATE(var value: DWORD) : DWORD(value.toLong()) { |
Check warning
Code scanning / detekt
A class or object's name should fit the naming pattern defined in the projects configuration. Warning
// Create an EXECUTION_STATE from the DWORD for the API call | ||
val executionState = EXECUTION_STATE(flags) | ||
Kernel32Extended.INSTANCE.SetThreadExecutionState(executionState) | ||
} catch (e: Exception) { |
Check warning
Code scanning / detekt
Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning
override fun allowSleep() { | ||
try { | ||
Kernel32Extended.INSTANCE.SetThreadExecutionState(ES_CONTINUOUS) | ||
} catch (e: Exception) { |
Check warning
Code scanning / detekt
Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning
class LinuxSleepPreventerX11 : SleepPreventer { | ||
|
||
private interface X11 : Library { | ||
fun XOpenDisplay(name: String?): Pointer? |
Check warning
Code scanning / detekt
Function names should follow the naming convention set in the configuration. Warning
|
||
private interface X11 : Library { | ||
fun XOpenDisplay(name: String?): Pointer? | ||
fun XCloseDisplay(display: Pointer) |
Check warning
Code scanning / detekt
Function names should follow the naming convention set in the configuration. Warning
private interface X11 : Library { | ||
fun XOpenDisplay(name: String?): Pointer? | ||
fun XCloseDisplay(display: Pointer) | ||
fun XSync(display: Pointer, discard: Boolean) |
Check warning
Code scanning / detekt
Function names should follow the naming convention set in the configuration. Warning
|
||
// X11's Bool is an int. Use Int 1/0 for suspend flag. | ||
private interface Xss : Library { | ||
fun XScreenSaverSuspend(display: Pointer, suspend: Int) |
Check warning
Code scanning / detekt
Function names should follow the naming convention set in the configuration. Warning
xss.XScreenSaverSuspend(dpy, 1) | ||
// Flush requests | ||
x11.XSync(dpy, false) | ||
} catch (t: Throwable) { |
Check warning
Code scanning / detekt
Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning
// Resume normal screensaver behavior | ||
xss.XScreenSaverSuspend(dpy, 0) | ||
x11.XSync(dpy, false) | ||
} catch (t: Throwable) { |
Check warning
Code scanning / detekt
Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning
No description provided.