-
Notifications
You must be signed in to change notification settings - Fork 27
feat: add DWeb server control to SnowbirdFragment and update service … #746
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
Conversation
| onMyGroups = onMyGroups, | ||
| onServerToggle = { enabled -> | ||
| if (enabled) { | ||
| requireContext().startForegroundService(Intent(requireContext(), SnowbirdService::class.java)) |
Check warning
Code scanning / detekt
Reports lines with exceeded length Warning
| onMyGroups = onMyGroups, | ||
| onServerToggle = { enabled -> | ||
| if (enabled) { | ||
| requireContext().startForegroundService(Intent(requireContext(), SnowbirdService::class.java)) |
Check warning
Code scanning / detekt
Reports incorrect argument list wrapping Warning
| onMyGroups = onMyGroups, | ||
| onServerToggle = { enabled -> | ||
| if (enabled) { | ||
| requireContext().startForegroundService(Intent(requireContext(), SnowbirdService::class.java)) |
Check warning
Code scanning / detekt
Reports incorrect argument list wrapping Warning
| onMyGroups = onMyGroups, | ||
| onServerToggle = { enabled -> | ||
| if (enabled) { | ||
| requireContext().startForegroundService(Intent(requireContext(), SnowbirdService::class.java)) |
Check warning
Code scanning / detekt
Reports incorrect argument list wrapping Warning
| onMyGroups = onMyGroups, | ||
| onServerToggle = { enabled -> | ||
| if (enabled) { | ||
| requireContext().startForegroundService(Intent(requireContext(), SnowbirdService::class.java)) |
Check warning
Code scanning / detekt
Reports incorrect argument list wrapping Warning
| } | ||
|
|
||
| @Composable | ||
| fun DwebServerPreference( |
Check warning
Code scanning / detekt
Function names should follow the naming convention set in the configuration. Warning
|
|
||
| @Preview | ||
| @Composable | ||
| private fun DwebServerPreferencePreview() { |
Check warning
Code scanning / detekt
Function names should follow the naming convention set in the configuration. Warning
|
|
||
| @Preview | ||
| @Composable | ||
| private fun DwebServerPreferencePreview() { |
Check warning
Code scanning / detekt
Private function is unused and should be removed. Warning
| } | ||
|
|
||
| // Give it a moment to clean up | ||
| delay(500) |
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
|
|
||
| updateStatus(ServiceStatus.Stopped) | ||
| Timber.d("Server shutdown complete") | ||
| } catch (e: Exception) { |
Check warning
Code scanning / detekt
The caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning
…status handling