Skip to content
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

Move Assets to RuuviLocalization #1847

Merged
merged 8 commits into from
Jan 6, 2024
Merged

Move Assets to RuuviLocalization #1847

merged 8 commits into from
Jan 6, 2024

Conversation

rinat-enikeev
Copy link
Contributor

Motivation: avoid duplicate assets, easy to import compile time safe usage

Motivation: avoid duplicate assets, easy to import compile time safe usage
@rinat-enikeev rinat-enikeev requested a review from priyonto January 6, 2024 16:26
Comment on lines 345 to 346
case .weatherProvider:
dataSourceIconView.image = RuuviAssets.weatherProviderImage
dataSourceIconView.image = RuuviAsset.iconWeatherstation.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a separate card but I think we don't need this anymore since virtual sensors are dead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 339 to 342
case .heartbeat:
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
case .log:
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have been combined, not sure why I did not do it. 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged

Comment on lines 748 to 749
case .weatherProvider:
dataSourceIconView.image = RuuviAssets.weatherProviderImage
dataSourceIconView.image = RuuviAsset.iconWeatherstation.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 742 to 745
case .heartbeat:
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
case .log:
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged

Comment on lines 436 to 438
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
case .log:
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged

Comment on lines 441 to 442
case .weatherProvider:
dataSourceIconView.image = RuuviAssets.weatherProviderImage
dataSourceIconView.image = RuuviAsset.iconWeatherstation.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 386 to 389
case .heartbeat:
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
case .log:
dataSourceIconView.image = RuuviAssets.heartbeatImage
dataSourceIconView.image = RuuviAsset.iconBluetoothConnected.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged

Comment on lines 392 to 393
case .weatherProvider:
dataSourceIconView.image = RuuviAssets.weatherProviderImage
dataSourceIconView.image = RuuviAsset.iconWeatherstation.image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 4 to 5
"idiom" : "universal",
"filename" : "info_icon.png"
"filename" : "web-ruuvi-eye-nega.pdf",
"idiom" : "universal"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct icon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this icon as not used


// swiftlint:disable identifier_name line_length nesting type_body_length type_name
public enum RuuviAsset {
public enum Resources {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename it OnboardingResources since they group the onboarding assets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

Copy link

sonarqubecloud bot commented Jan 6, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
1.7% Duplication on New Code

See analysis details on SonarCloud

@rinat-enikeev rinat-enikeev merged commit baab231 into dev Jan 6, 2024
2 checks passed
@rinat-enikeev rinat-enikeev deleted the feature/assets branch January 6, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants