mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-27 21:50:50 +00:00
97 lines
3.1 KiB
Objective-C
97 lines
3.1 KiB
Objective-C
/*
|
|
* Author: Andreas Linde <mail@andreaslinde.de>
|
|
* Kent Sutherland
|
|
*
|
|
* Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
|
* Copyright (c) 2011 Andreas Linde & Kent Sutherland.
|
|
* All rights reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person
|
|
* obtaining a copy of this software and associated documentation
|
|
* files (the "Software"), to deal in the Software without
|
|
* restriction, including without limitation the rights to use,
|
|
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following
|
|
* conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be
|
|
* included in all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
* OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "BITFeedbackMessage.h"
|
|
|
|
|
|
@interface BITFeedbackManager () {
|
|
}
|
|
|
|
|
|
@property (nonatomic, retain) NSMutableArray *feedbackList;
|
|
@property (nonatomic, retain) NSString *token;
|
|
|
|
|
|
// used by BITHockeyManager if disable status is changed
|
|
@property (nonatomic, getter = isFeedbackManagerDisabled) BOOL disableFeedbackManager;
|
|
|
|
@property (nonatomic, retain) BITFeedbackListViewController *currentFeedbackListViewController;
|
|
@property (nonatomic, retain) BITFeedbackComposeViewController *currentFeedbackComposeViewController;
|
|
@property (nonatomic) BOOL didAskUserData;
|
|
|
|
@property (nonatomic, retain) NSDate *lastCheck;
|
|
|
|
@property (nonatomic, retain) NSNumber *lastMessageID;
|
|
|
|
@property (nonatomic, copy) NSString *userID;
|
|
@property (nonatomic, copy) NSString *userName;
|
|
@property (nonatomic, copy) NSString *userEmail;
|
|
|
|
|
|
// load new messages from the server
|
|
- (void)updateMessagesList;
|
|
|
|
// load new messages from the server if the last request is too long ago
|
|
- (void)updateMessagesListIfRequired;
|
|
|
|
- (NSUInteger)numberOfMessages;
|
|
- (BITFeedbackMessage *)messageAtIndex:(NSUInteger)index;
|
|
|
|
- (void)submitMessageWithText:(NSString *)text;
|
|
- (void)submitPendingMessages;
|
|
|
|
// Returns YES if manual user data can be entered, required or optional
|
|
- (BOOL)askManualUserDataAvailable;
|
|
|
|
// Returns YES if required user data is missing?
|
|
- (BOOL)requireManualUserDataMissing;
|
|
|
|
// Returns YES if user data is available and can be edited
|
|
- (BOOL)isManualUserDataAvailable;
|
|
|
|
// used in the user data screen
|
|
- (void)updateDidAskUserData;
|
|
|
|
|
|
- (BITFeedbackMessage *)messageWithID:(NSNumber *)messageID;
|
|
|
|
- (NSArray *)messagesWithStatus:(BITFeedbackMessageStatus)status;
|
|
|
|
- (void)saveMessages;
|
|
|
|
- (void)fetchMessageUpdates;
|
|
- (void)updateMessageListFromResponse:(NSDictionary *)jsonDictionary;
|
|
|
|
- (BOOL)deleteMessageAtIndex:(NSUInteger)index;
|
|
- (void)deleteAllMessages;
|
|
|
|
@end
|