aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index eb5683f..6286884 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -165,10 +165,13 @@ int main(int argc, char **argv)
database.setOnAddUserCallback([&currentUserKeyPair, &channels, &channelMessageMutex, &waitingToJoin](const odhtdb::DatabaseAddUserRequest &request)
{
lock_guard<recursive_mutex> lock(channelMessageMutex);
+ printf("Add user callback. Channel to add user to: %s\n", request.nodeHash->toString().c_str());
for(Channel *channel : channels)
{
+ printf("My channel: %s (%s)\n", channel->getNodeInfo().getRequestHash()->toString().c_str(), channel->getName().c_str());
if(*request.nodeHash == *channel->getNodeInfo().getRequestHash())
{
+ printf("Add user to one of my channels\n");
if(currentUserKeyPair && request.userToAdd->getPublicKey() == currentUserKeyPair->getPublicKey() && channel->getLocalUser()->type != User::Type::ONLINE)
{
printf("You were added to channel %s by %s\n", request.nodeHash->toString().c_str(), request.creatorUser->getName().c_str());
@@ -493,7 +496,7 @@ int main(int argc, char **argv)
window.draw(shadeRect);
const sf::Font *FONT = ResourceCache::getFont("fonts/Roboto-Regular.ttf");
- const float FONT_SIZE = 30 * Settings::getScaling();
+ const float FONT_SIZE = (double)windowSize.x / 40.0;
sf::Text text("Wait until you are added to the channel", *FONT, FONT_SIZE);
text.setPosition(floor((float)windowSize.x * 0.5f - text.getLocalBounds().width * 0.5f), floor((float)windowSize.y * 0.5f - FONT->getLineSpacing(FONT_SIZE) * 0.5f));
window.draw(text);