Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
8c83d32d
Commit
8c83d32d
authored
Jul 16, 2017
by
Wescoeur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(MessagesCountNotifier): limit counter to 99
parent
de2fcd99
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
MessagesCountNotifier.cpp
src/components/core/MessagesCountNotifier.cpp
+6
-5
MessagesCountNotifier.hpp
src/components/core/MessagesCountNotifier.hpp
+1
-1
MessagesCountNotifierMacOS.h
src/components/core/MessagesCountNotifierMacOS.h
+1
-2
MessagesCountNotifierMacOS.m
src/components/core/MessagesCountNotifierMacOS.m
+0
-1
No files found.
src/components/core/MessagesCountNotifier.cpp
View file @
8c83d32d
...
...
@@ -22,15 +22,15 @@
#include "../core/CoreManager.hpp"
#include "MessagesCountNotifier.hpp"
#if defined(Q_OS_LINUX)
// TODO.
#elif defined(Q_OS_MACOS)
#include "MessagesCountNotifierMacOS.h"
#elif defined(Q_OS_WIN)
// TODO.
#endif
#endif // if defined(Q_OS_LINUX)
#include "MessagesCountNotifier.hpp"
using
namespace
std
;
...
...
@@ -62,14 +62,15 @@ void MessagesCountNotifier::updateUnreadMessagesCount () {
void
MessagesCountNotifier
::
notifyUnreadMessagesCount
()
{
qInfo
()
<<
QStringLiteral
(
"Notify unread messages count: %1."
).
arg
(
mUnreadMessagesCount
);
int
count
=
mUnreadMessagesCount
>
99
?
99
:
mUnreadMessagesCount
;
#if defined(Q_OS_LINUX)
// TODO.
#elif defined(Q_OS_MACOS)
::
notifyUnreadMessagesCountMacOS
(
mUnreadMessagesC
ount
);
::
notifyUnreadMessagesCountMacOS
(
c
ount
);
#elif defined(Q_OS_WIN)
// TODO.
#endif
#endif
// if defined(Q_OS_LINUX)
}
// -----------------------------------------------------------------------------
...
...
src/components/core/MessagesCountNotifier.hpp
View file @
8c83d32d
...
...
@@ -27,7 +27,7 @@
// =============================================================================
namespace
linphone
{
class
ChatMessage
;
class
ChatMessage
;
}
class
ChatModel
;
...
...
src/components/core/MessagesCountNotifierMacOS.h
View file @
8c83d32d
...
...
@@ -22,5 +22,4 @@
// =============================================================================
extern
"C"
void
notifyUnreadMessagesCountMacOS
(
int
count
);
extern
"C"
void
notifyUnreadMessagesCountMacOS
(
int
count
);
src/components/core/MessagesCountNotifierMacOS.m
View file @
8c83d32d
...
...
@@ -28,4 +28,3 @@ void notifyUnreadMessagesCountMacOS(int count) {
NSString
*
badgeStr
=
(
count
>
0
)
?
[
NSString
stringWithFormat
:
@"%d"
,
count
]
:
@""
;
[[
NSApp
dockTile
]
setBadgeLabel
:
badgeStr
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment