Skip to content

Commit

Permalink
Feat: Show tweak version in settings footer
Browse files Browse the repository at this point in the history
  • Loading branch information
SoCuul committed Mar 14, 2024
1 parent a0b720b commit 35e5398
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Controllers/SettingsViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import <Preferences/PSSwitchTableCell.h>

#import "../InstagramHeaders.h"
#import "../Tweak.h"

typedef NS_ENUM(NSInteger, DynamicSpecifierOperatorType) {
EqualToOperatorType,
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ - (NSArray *)specifiers {
[self newSwitchCellWithTitle:@"Enable FLEX gesture" detailTitle:@"Allows you to hold 5 fingers on the screen to open the FLEX explorer" key:@"flex_instagram" defaultValue:false changeAction:@selector(FLEXAction:)],

// Section 8: Credits
[self newSectionWithTitle:@"Credits" footer:nil],
[self newSectionWithTitle:@"Credits" footer:[NSString stringWithFormat:@"BHInsta %@", BHIVersionString]],
[self newHBTwitterCellWithTitle:@"Maintainer" twitterUsername:@"SoVeryCuul" customAvatarURL:@"https://unavatar.io/twitter/SoVeryCuul"],
[self newHBTwitterCellWithTitle:@"Original Author" twitterUsername:@"BandarHL" customAvatarURL:@"https://unavatar.io/twitter/BandarHL"],
[self newHBLinkCellWithTitle:@"View Repo" detailTitle:@"View the tweak's source code on GitHub" url:@"https://github.com/SoCuul/BHInsta"]
Expand Down
3 changes: 3 additions & 0 deletions src/Tweak.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#import <Foundation/Foundation.h>

// * Tweak version *
extern NSString *BHIVersionString;

// Variables that work across features
extern BOOL seenButtonEnabled; // Whether dm message seen button is enabled
extern BOOL dmVisualMsgsViewedButtonEnabled; // Whether story dm unlimited views button is enabled
3 changes: 3 additions & 0 deletions src/Tweak.x
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#import "Controllers/SecurityViewController.h"
#import "Controllers/SettingsViewController.h"

// * Tweak version *
NSString *BHIVersionString = @"v0.2.2";

// Variables that work across features
BOOL seenButtonEnabled = false;
BOOL dmVisualMsgsViewedButtonEnabled = false;
Expand Down

0 comments on commit 35e5398

Please sign in to comment.