TUIConfig.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //
  2. // TUIConfig.h
  3. // TUIKit
  4. //
  5. // Created by kennethmiao on 2018/11/5.
  6. // Copyright © 2018 Tencent. All rights reserved.
  7. //
  8. /**
  9. *
  10. *
  11. * This class depends on the implementation of Tencent Cloud Chat SDK
  12. *
  13. * TUIConfig implements the default initialization of the configuration file, you can change the default configuration here according to your needs
  14. * Configuration file include emoticons, default icons, and more
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import <UIKit/UIKit.h>
  18. #import "TUICommonModel.h"
  19. #define DefaultAvatarImage ([TUIConfig defaultConfig].defaultAvatarImage)
  20. #define DefaultGroupAvatarImage ([TUIConfig defaultConfig].defaultGroupAvatarImage)
  21. #define DefaultGroupAvatarImageByGroupType(groupType) ([[TUIConfig defaultConfig] getGroupAvatarImageByGroupType:groupType])
  22. typedef NS_ENUM(NSInteger, TUIKitAvatarType) {
  23. TAvatarTypeNone,
  24. TAvatarTypeRounded,
  25. TAvatarTypeRadiusCorner,
  26. };
  27. @interface TUIConfig : NSObject
  28. + (TUIConfig *)defaultConfig;
  29. /**
  30. * Type of avatar
  31. */
  32. @property(nonatomic, assign) TUIKitAvatarType avatarType;
  33. /**
  34. * The size of the rounded corners of the avatar
  35. */
  36. @property(nonatomic, assign) CGFloat avatarCornerRadius;
  37. /**
  38. * Default user avatar
  39. */
  40. @property(nonatomic, strong) UIImage *defaultAvatarImage;
  41. /**
  42. * Default group avatar
  43. */
  44. @property(nonatomic, strong) UIImage *defaultGroupAvatarImage;
  45. /**
  46. * When sending a message, the flag used to identify whether the current message is not counted as unread, the default is NO
  47. */
  48. @property(nonatomic, assign) BOOL isExcludedFromUnreadCount;
  49. /**
  50. * When sending a message, the flag used to identify whether the current message does not update the lastMessage of the conversation, the default is NO
  51. */
  52. @property(nonatomic, assign) BOOL isExcludedFromLastMessage;
  53. /**
  54. * Whether to allow default pop-up prompts inside TUIKit
  55. */
  56. @property(nonatomic, assign) BOOL enableToast;
  57. /**
  58. * Whether to enable custom ringtone (only valid for Android)
  59. */
  60. @property(nonatomic, assign) BOOL enableCustomRing;
  61. /**
  62. * Display users' online status in session and contact list. NO in default.
  63. */
  64. @property(nonatomic, assign) BOOL displayOnlineStatusIcon;
  65. /**
  66. * Group avatar, allows to display avatars in the nine-square grid style, default is YES
  67. */
  68. @property(nonatomic, assign) BOOL enableGroupGridAvatar;
  69. - (UIImage *)getGroupAvatarImageByGroupType:(NSString *)groupType;
  70. - (void)setSceneOptimizParams:(NSString *)path; //(For RTC,Don't delete)
  71. @end