From c1aa20ee8e183c4b978e5777b4b48b02bb86d946 Mon Sep 17 00:00:00 2001 From: GerardKessler Date: Wed, 11 Dec 2024 07:45:51 -0300 Subject: [PATCH] =?UTF-8?q?a=C3=B1adidos=20condicionales=20para=20verifica?= =?UTF-8?q?r=20que=20el=20elemento=20no=20sea=20None=20en=20=5F=5Finit=5F?= =?UTF-8?q?=5F.py,=20line=20108.=20Y=20lib/emoji/core.py,=20line=20181?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/appModules/whatsapp/__init__.py | 2 +- addon/appModules/whatsapp/lib/emoji/core.py | 4 +++- buildVars.py | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addon/appModules/whatsapp/__init__.py b/addon/appModules/whatsapp/__init__.py index b7f092e..21b305c 100644 --- a/addon/appModules/whatsapp/__init__.py +++ b/addon/appModules/whatsapp/__init__.py @@ -105,7 +105,7 @@ def event_NVDAObject_init(self, obj): obj.name= f'{obj.name} ({element.name})' if getattr(obj, 'UIAAutomationId', 'BubbleListItem') != 'BubbleListItem' or not self.remove_phone_number and not self.remove_emojis: return - if self.remove_phone_number and '+' in obj.name: + if obj.name and self.remove_phone_number and hasattr(obj, 'name') and '+' in obj.name: obj.name= sub(r'\+\d[\d\s\:\~\&\(\)-]{12,}', '', obj.name) if self.remove_emojis: obj.name= emoji.replace_emoji(obj.name, '') diff --git a/addon/appModules/whatsapp/lib/emoji/core.py b/addon/appModules/whatsapp/lib/emoji/core.py index c635cde..d846a71 100644 --- a/addon/appModules/whatsapp/lib/emoji/core.py +++ b/addon/appModules/whatsapp/lib/emoji/core.py @@ -178,7 +178,9 @@ def demojize( tree = _get_search_tree() result = [] i = 0 - length = len(string) + length = 0 + if string: + length = len(string) while i < length: consumed = False char = string[i] diff --git a/buildVars.py b/buildVars.py index e750bcd..7b27fad 100644 --- a/buildVars.py +++ b/buildVars.py @@ -25,7 +25,7 @@ def _(arg): # Translators: Long description to be shown for this add-on on add-on information from add-ons manager "addon_description": _("""Complemento que renombra botones sin etiqueta, añade atajos de teclado para funciones principales de la aplicación, y funciones de enfoque para una mejor interacción con la interfaz. Solo disponible para la versión UWP."""), # version - "addon_version": "2.2.3", + "addon_version": "2.3.0", # Author(s) "addon_author": "Gerardo Kessler ", # URL for the add-on documentation support @@ -35,7 +35,7 @@ def _(arg): # Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional) "addon_minimumNVDAVersion": "2023.1.0", # Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version) - "addon_lastTestedNVDAVersion": "2024.1.0", + "addon_lastTestedNVDAVersion": "2024.4.1", # Add-on update channel (default is None, denoting stable releases, # and for development releases, use "dev".) # Do not change unless you know what you are doing!