Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-uwp
Commits
72be7463
Commit
72be7463
authored
Oct 20, 2017
by
atraczyk
Committed by
Adrien Béraud
Aug 07, 2018
Browse files
account edition: fix username registration post account creation
Change-Id: Id48e9a72b3f67c353b237fc506a9a1e3eea09cae
parent
0d1dcc9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
RingD.cpp
View file @
72be7463
...
...
@@ -653,9 +653,7 @@ RingD::registerName(String^ accountId, String^ password, String^ username)
auto
_password
=
Utils
::
toString
(
password
);
auto
_username
=
Utils
::
toString
(
username
);
bool
result
;
result
=
DRing
::
registerName
(
_accountId
,
_password
,
_username
);
DRing
::
registerName
(
_accountId
,
_password
,
_username
);
});
}
...
...
@@ -1109,6 +1107,7 @@ RingD::registerCallbacks()
bool
res
=
state
==
0
;
Utils
::
runOnUIThread
([
this
,
res
,
account_id
]()
{
nameRegistered
(
res
,
Utils
::
toPlatformString
(
account_id
));
mainPage
->
showLoadingOverlay
(
false
,
false
);
});
if
(
!
res
)
return
;
...
...
SmartPanel.xaml.cpp
View file @
72be7463
...
...
@@ -937,9 +937,6 @@ void RingClientUWP::Views::SmartPanel::_acceptAccountModification__Click(Platfor
selectMenu
(
MenuOpen
::
ACCOUNTS_LIST
);
updatePageContent
();
if
(
_usernameValidEdition_
->
Visibility
==
Windows
::
UI
::
Xaml
::
Visibility
::
Visible
&&
_usernameTextBoxEdition_
->
Text
->
Length
()
>
2
)
RingD
::
instance
->
registerName
(
account
->
accountID_
,
""
,
_usernameTextBoxEdition_
->
Text
);
}
...
...
Utils.h
View file @
72be7463
...
...
@@ -615,23 +615,29 @@ public:
task_queue
(
task_queue
const
&
other
)
{}
void
add_task
(
std
::
function
<
void
()
>
const
&
task
)
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
taskMutex_
);
tasks_
.
push
(
task
);
runOnWorkerThread
([
this
,
task
]()
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
taskMutex_
);
tasks_
.
push
(
task
);
});
}
void
dequeue_tasks
()
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
taskMutex_
);
while
(
!
tasks_
.
empty
())
{
auto
f
=
tasks_
.
front
();
f
();
tasks_
.
pop
();
}
runOnWorkerThread
([
this
]()
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
taskMutex_
);
while
(
!
tasks_
.
empty
())
{
auto
f
=
tasks_
.
front
();
f
();
tasks_
.
pop
();
}
});
}
void
clear
()
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
taskMutex_
);
std
::
queue
<
std
::
function
<
void
()
>>
empty
;
std
::
swap
(
tasks_
,
empty
);
runOnWorkerThread
([
this
]()
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
taskMutex_
);
std
::
queue
<
std
::
function
<
void
()
>>
empty
;
std
::
swap
(
tasks_
,
empty
);
});
}
private:
...
...
Write
Preview
Supports
Markdown
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