From 32b48e3baea25d01efde34843978cb3b94507372 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 26 Sep 2014 22:41:54 +0000 Subject: Tox: - updater tox core - avatars support part 2 git-svn-id: http://svn.miranda-ng.org/main/trunk@10609 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_account.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'protocols/Tox/src/tox_account.cpp') diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp index 8af024e9f8..b7c7276c12 100644 --- a/protocols/Tox/src/tox_account.cpp +++ b/protocols/Tox/src/tox_account.cpp @@ -55,7 +55,7 @@ void CToxProto::InitToxCore() tox_callback_file_control(tox, OnFileRequest, this); tox_callback_file_send_request(tox, OnFriendFile, this); tox_callback_file_data(tox, OnFileData, this); - // avatars + // avatars tox_callback_avatar_info(tox, OnGotFriendAvatarInfo, this); tox_callback_avatar_data(tox, OnGotFriendAvatarData, this); @@ -71,6 +71,12 @@ void CToxProto::InitToxCore() tox_get_address(tox, &pubKey[0]); std::string address = DataToHexString(pubKey); setString(NULL, TOX_SETTINGS_ID, address.c_str()); + + std::tstring avatarPath = GetContactAvatarFilePath(NULL); + if (IsFileExists(avatarPath)) + { + SetToxAvatar(avatarPath); + } } void CToxProto::UninitToxCore() -- cgit v1.2.3