|
@@ -31,14 +31,11 @@
|
31
|
31
|
|
32
|
32
|
@implementation Reddit
|
33
|
33
|
|
34
|
|
-NSString *version = @"1.0.0";
|
35
|
|
-NSString *author = @"xythobuz";
|
36
|
|
-NSString *appName = @"RedditBar";
|
37
|
|
-
|
38
|
34
|
NSInteger maxTitleLength = 50;
|
39
|
35
|
NSString *replaceTextForTitle = @"...";
|
|
36
|
+#define AUTHOR @"xythobuz"
|
40
|
37
|
|
41
|
|
-@synthesize username, modhash, password, length, subreddits;
|
|
38
|
+@synthesize username, modhash, password, version, appName, author, length, subreddits;
|
42
|
39
|
|
43
|
40
|
-(id)initWithUsername:(NSString *)name Modhash:(NSString *)hash Length:(NSInteger)leng {
|
44
|
41
|
self = [super init];
|
|
@@ -47,6 +44,9 @@ NSString *replaceTextForTitle = @"...";
|
47
|
44
|
modhash = hash;
|
48
|
45
|
password = nil;
|
49
|
46
|
length = leng;
|
|
47
|
+ version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
|
|
48
|
+ appName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
|
|
49
|
+ author = AUTHOR;
|
50
|
50
|
}
|
51
|
51
|
return self;
|
52
|
52
|
}
|
|
@@ -57,6 +57,10 @@ NSString *replaceTextForTitle = @"...";
|
57
|
57
|
username = name;
|
58
|
58
|
modhash = nil;
|
59
|
59
|
password = pass;
|
|
60
|
+ length = 0;
|
|
61
|
+ version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
|
|
62
|
+ appName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
|
|
63
|
+ author = AUTHOR;
|
60
|
64
|
}
|
61
|
65
|
return self;
|
62
|
66
|
}
|