-
Notifications
You must be signed in to change notification settings - Fork 106
fix: correct config key in DSG property initialization #947
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates DSG property initialization to use the correct config key and aligns the log message to reflect the pause player setting. Class diagram for updated Audio property initializationclassDiagram
class Audio {
+audioDConfig
+PropsMu
+PausePlayer bool
+initDsgProp() error
+setEnableAutoSwitchPort(value bool)
}
class audioDConfig {
+GetValueBool(key string) (bool, error)
}
Audio --> audioDConfig: uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Fixed GetValueBool call to use correct dsgKeyAutoSwitchPort instead of dsgkeyPausePlayer - Corrected log message to properly indicate "pause player" value Log: correct config key in DSG property initialization pms: BUG-338349
deepin pr auto review我来对这个代码变更进行审查:
改进建议:
val, err := a.audioDConfig.GetValueBool(dsgKeyAutoSwitchPort)
if err != nil {
logger.Warning(err)
}
logger.Info("auto switch port:", val)
val, err := a.audioDConfig.GetValueBool(dsgkeyPausePlayer)
if err != nil {
logger.Warning(err)
}
logger.Info("pause player:", val)
const (
DsgKeyAutoSwitchPort = "dsg.auto.switch.port"
DsgKeyPausePlayer = "dsg.pause.player"
)请根据实际需求选择合适的修改方案,确保代码的逻辑一致性。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, wyu71 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Log: correct config key in DSG property initialization
pms: BUG-338349
Summary by Sourcery
Correct the DSG property initialization by using the proper config key for autoSwitchPort and updating the log message for pause player
Bug Fixes: