Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
048738e5
Commit
048738e5
authored
4 years ago
by
Pierre Lespagnol
Committed by
Sébastien Blin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
newaccountmodel: add account preference to set local moderators
Change-Id: Ifefb898c5d57c8e6d21666822bec05195bd276b8
parent
5f7d8447
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/api/newaccountmodel.h
+12
-0
12 additions, 0 deletions
src/api/newaccountmodel.h
src/newaccountmodel.cpp
+12
-0
12 additions, 0 deletions
src/newaccountmodel.cpp
src/qtwrapper/configurationmanager_wrap.h
+10
-0
10 additions, 0 deletions
src/qtwrapper/configurationmanager_wrap.h
with
34 additions
and
0 deletions
src/api/newaccountmodel.h
+
12
−
0
View file @
048738e5
...
...
@@ -213,6 +213,18 @@ public:
* @return default moderators for the account
*/
QStringList
getDefaultModerators
(
const
QString
&
accountID
);
/**
* Enable/disable local moderators
* @param accountID
* @param isModEnabled
*/
void
enableLocalModerators
(
const
QString
&
accountID
,
const
bool
&
isModEnabled
);
/**
* Get local moderators state
* @param accountID
* @return if local moderator is enabled
*/
bool
isLocalModeratorsEnabled
(
const
QString
&
accountID
);
Q_SIGNALS
:
/**
...
...
This diff is collapsed.
Click to expand it.
src/newaccountmodel.cpp
+
12
−
0
View file @
048738e5
...
...
@@ -1160,6 +1160,18 @@ NewAccountModel::getDefaultModerators(const QString& accountID)
return
ConfigurationManager
::
instance
().
getDefaultModerators
(
accountID
);
}
void
NewAccountModel
::
enableLocalModerators
(
const
QString
&
accountID
,
const
bool
&
isModEnabled
)
{
ConfigurationManager
::
instance
().
enableLocalModerators
(
accountID
,
isModEnabled
);
}
bool
NewAccountModel
::
isLocalModeratorsEnabled
(
const
QString
&
accountID
)
{
return
ConfigurationManager
::
instance
().
isLocalModeratorsEnabled
(
accountID
);
}
}
// namespace lrc
#include
"api/moc_newaccountmodel.cpp"
...
...
This diff is collapsed.
Click to expand it.
src/qtwrapper/configurationmanager_wrap.h
+
10
−
0
View file @
048738e5
...
...
@@ -833,6 +833,16 @@ public Q_SLOTS: // METHODS
return
convertStringList
(
DRing
::
getDefaultModerators
(
accountID
.
toStdString
()));
}
void
enableLocalModerators
(
const
QString
&
accountID
,
const
bool
&
isModEnabled
)
{
DRing
::
enableLocalModerators
(
accountID
.
toStdString
(),
isModEnabled
);
}
bool
isLocalModeratorsEnabled
(
const
QString
&
accountID
)
{
return
DRing
::
isLocalModeratorsEnabled
(
accountID
.
toStdString
());
}
Q_SIGNALS
:
// SIGNALS
void
volumeChanged
(
const
QString
&
device
,
double
value
);
void
accountsChanged
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment