mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-11-04 15:23:28 +01:00 
			
		
		
		
	Enhanced detect bugfix + outdated apps show curr. ver.
This commit is contained in:
		@@ -258,50 +258,60 @@ class AppsPageState extends State<AppsPage> {
 | 
				
			|||||||
                                .toString() ??
 | 
					                                .toString() ??
 | 
				
			||||||
                            '100'
 | 
					                            '100'
 | 
				
			||||||
                      ]))
 | 
					                      ]))
 | 
				
			||||||
                    : (sortedApps[index].app.installedVersion != null &&
 | 
					                    : (Column(
 | 
				
			||||||
                            sortedApps[index].app.installedVersion !=
 | 
					                        mainAxisAlignment: MainAxisAlignment.center,
 | 
				
			||||||
                                sortedApps[index].app.latestVersion
 | 
					                        crossAxisAlignment: CrossAxisAlignment.end,
 | 
				
			||||||
                        ? Column(
 | 
					                        children: [
 | 
				
			||||||
                            mainAxisAlignment: MainAxisAlignment.center,
 | 
					                          SingleChildScrollView(
 | 
				
			||||||
                            crossAxisAlignment: CrossAxisAlignment.end,
 | 
					                              child: SizedBox(
 | 
				
			||||||
                            children: [
 | 
					                                  width: 80,
 | 
				
			||||||
                              Text(appsProvider.areDownloadsRunning()
 | 
					                                  child: Text(
 | 
				
			||||||
                                  ? tr('pleaseWait')
 | 
					                                    '${sortedApps[index].app.installedVersion ?? tr('notInstalled')}${sortedApps[index].app.trackOnly == true ? ' ${tr('estimateInBrackets')}' : ''}',
 | 
				
			||||||
                                  : '${tr('updateAvailable')}${sortedApps[index].app.trackOnly ? ' ${tr('estimateInBracketsShort')}' : ''}'),
 | 
					                                    overflow: TextOverflow.fade,
 | 
				
			||||||
                              SourceProvider()
 | 
					                                    textAlign: TextAlign.end,
 | 
				
			||||||
                                          .getSource(sortedApps[index].app.url)
 | 
					                                  ))),
 | 
				
			||||||
                                          .changeLogPageFromStandardUrl(
 | 
					                          sortedApps[index].app.installedVersion != null &&
 | 
				
			||||||
                                              sortedApps[index].app.url) ==
 | 
					                                  sortedApps[index].app.installedVersion !=
 | 
				
			||||||
                                      null
 | 
					                                      sortedApps[index].app.latestVersion
 | 
				
			||||||
                                  ? const SizedBox()
 | 
					                              ? GestureDetector(
 | 
				
			||||||
                                  : GestureDetector(
 | 
					                                  onTap: SourceProvider()
 | 
				
			||||||
                                      onTap: () {
 | 
					                                              .getSource(
 | 
				
			||||||
                                        launchUrlString(
 | 
					                                                  sortedApps[index].app.url)
 | 
				
			||||||
                                            SourceProvider()
 | 
					                                              .changeLogPageFromStandardUrl(
 | 
				
			||||||
                                                .getSource(
 | 
					                                                  sortedApps[index].app.url) ==
 | 
				
			||||||
                                                    sortedApps[index].app.url)
 | 
					                                          null
 | 
				
			||||||
                                                .changeLogPageFromStandardUrl(
 | 
					                                      ? null
 | 
				
			||||||
                                                    sortedApps[index].app.url)!,
 | 
					                                      : () {
 | 
				
			||||||
                                            mode:
 | 
					                                          launchUrlString(
 | 
				
			||||||
                                                LaunchMode.externalApplication);
 | 
					                                              SourceProvider()
 | 
				
			||||||
                                      },
 | 
					                                                  .getSource(
 | 
				
			||||||
                                      child: const Text(
 | 
					                                                      sortedApps[index].app.url)
 | 
				
			||||||
                                        'See Changes',
 | 
					                                                  .changeLogPageFromStandardUrl(
 | 
				
			||||||
                                        style: TextStyle(
 | 
					                                                      sortedApps[index]
 | 
				
			||||||
                                            fontStyle: FontStyle.italic,
 | 
					                                                          .app
 | 
				
			||||||
                                            decoration:
 | 
					                                                          .url)!,
 | 
				
			||||||
                                                TextDecoration.underline),
 | 
					                                              mode: LaunchMode
 | 
				
			||||||
                                      )),
 | 
					                                                  .externalApplication);
 | 
				
			||||||
                            ],
 | 
					                                        },
 | 
				
			||||||
                          )
 | 
					                                  child: Text(
 | 
				
			||||||
                        : SingleChildScrollView(
 | 
					                                    '${tr('updateAvailable')}${sortedApps[index].app.trackOnly ? ' ${tr('estimateInBracketsShort')}' : ''}',
 | 
				
			||||||
                            child: SizedBox(
 | 
					                                    style: TextStyle(
 | 
				
			||||||
                                width: 80,
 | 
					                                        fontStyle: FontStyle.italic,
 | 
				
			||||||
                                child: Text(
 | 
					                                        decoration: SourceProvider()
 | 
				
			||||||
                                  '${sortedApps[index].app.installedVersion ?? tr('notInstalled')}${sortedApps[index].app.trackOnly == true ? ' ${tr('estimateInBrackets')}' : ''}',
 | 
					                                                    .getSource(sortedApps[index]
 | 
				
			||||||
                                  overflow: TextOverflow.fade,
 | 
					                                                        .app
 | 
				
			||||||
                                  textAlign: TextAlign.end,
 | 
					                                                        .url)
 | 
				
			||||||
                                )))),
 | 
					                                                    .changeLogPageFromStandardUrl(
 | 
				
			||||||
 | 
					                                                        sortedApps[index]
 | 
				
			||||||
 | 
					                                                            .app
 | 
				
			||||||
 | 
					                                                            .url) ==
 | 
				
			||||||
 | 
					                                                null
 | 
				
			||||||
 | 
					                                            ? TextDecoration.none
 | 
				
			||||||
 | 
					                                            : TextDecoration.underline),
 | 
				
			||||||
 | 
					                                  ))
 | 
				
			||||||
 | 
					                              : const SizedBox(),
 | 
				
			||||||
 | 
					                        ],
 | 
				
			||||||
 | 
					                      )),
 | 
				
			||||||
                onTap: () {
 | 
					                onTap: () {
 | 
				
			||||||
                  if (selectedApps.isNotEmpty) {
 | 
					                  if (selectedApps.isNotEmpty) {
 | 
				
			||||||
                    toggleAppSelected(sortedApps[index].app);
 | 
					                    toggleAppSelected(sortedApps[index].app);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -201,7 +201,7 @@ ObtainiumError getObtainiumHttpError(Response res) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
String? extractStandardVersionName(String version, {bool strict = false}) {
 | 
					String? extractStandardVersionName(String version, {bool strict = false}) {
 | 
				
			||||||
  var match = RegExp(
 | 
					  var match = RegExp(
 | 
				
			||||||
          '${strict ? '^' : ''}[0-9]+(\\.[0-9]+)*(-(alpha|beta)\\+?[0-9]+)?${strict ? '\$' : ''}')
 | 
					          '${strict ? '^' : ''}[0-9]+(\\.[0-9]+)+(-(alpha|beta)\\+?[0-9]+)?${strict ? '\$' : ''}')
 | 
				
			||||||
      .firstMatch(version);
 | 
					      .firstMatch(version);
 | 
				
			||||||
  return match != null ? version.substring(match.start, match.end) : null;
 | 
					  return match != null ? version.substring(match.start, match.end) : null;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user